]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* how-resources.texinfo: Add some additional words about where to find
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
b0cce7e1
CV
1Fri Sep 7 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
2
3 * include/limits.h: Define PIPE_BUF.
4 * syscalls.cc (fpathconf): Use PIPE_BUF instead of numerical constant.
5 (pathconf): Ditto.
6
04da0bbe
CF
7Thu Sep 6 20:04:05 2001 Christopher Faylor <cgf@cygnus.com>
8
9 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Ensure that
10 prot_info_ptr is zeroed for later use.
11
b2bfade3
CF
12Thu Sep 6 14:03:49 2001 Christopher Faylor <cgf@cygnus.com>
13
14 * cygheap.cc (cygheap_fixup_in_child): Don't consider a NULL bucket as
15 a candidate for deletion. It is actually the end of a linked list
16 chain.
17
18 * exceptions.cc (open_stackdumpfile): Default to "unknown" program name
19 if myself->progname hasn't been filled out yet.
20
57c89867
CF
21Thu Sep 6 01:16:44 2001 Christopher Faylor <cgf@cygnus.com>
22
23 Move appropriate variables to NO_COPY segment, throughout.
24
08b78edf
CF
25Thu Sep 6 00:40:35 2001 Christopher Faylor <cgf@cygnus.com>
26
27 Remove initialization of static or global values to zero, throughout.
28 This just needlessly grows the size of the DLL.
29 * tty.cc (tty::alive): Make inuse handle non-inheriting on open, just
30 for thread safety.
31
4ce15a49
CF
32Wed Sep 5 23:36:03 2001 Christopher Faylor <cgf@cygnus.com>
33
34 * cygheap.h (init_cygheap): Move bucket array here from cygheap.cc.
35 * cygheap.cc: Throughout use bucket array from cygheap.
36
37 * sigproc.cc (proc_subproc): Dynamically allocate zombie buffer to save
38 DLL space.
39 (sigproc_fixup_after_fork): Free zombie array after a fork.
40 * sigproc.h (sigproc_fixup_after_fork): Declare.
41
422001-09-06 Egor Duda <deo@logos-m.ru>
43
44 * dir.cc (mkdir): Expand buffer for security descriptor to 4K to avoid
45 stack corruption.
46 * fhandler.cc (fhandler_base::open): Ditto.
47 * path.cc (symlink): Ditto.
48
5bcf2f93
CV
49Wed Sep 5 21:35:00 2001 Corinna Vinschen <corinna@vinschen.de>
50
51 * winver.rc: Change copyright to include 2001.
52
37c23731
CV
53Wed Sep 5 12:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
54
55 * fhandler_floppy.cc (fhandler_floppy::lseek): Remove iswinnt check.
56
669153e1
CV
57Wed Sep 5 11:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
58
59 * fhandler_socket.cc (fhandler_socket::close): Change 2MSL value
60 according to MSDN.
61
47497e62
CV
62Wed Sep 5 10:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
63
64 * net.cc (cygwin_connect): Add WSAEALREADY and WSAEINVAL handling
65 for non-blocking sockets.
66
d72a6559
CF
67Tue Sep 4 22:42:13 2001 Christopher Faylor <cgf@cygnus.com>
68
69 * exceptions.cc (ctrl_c_handler): Only send SIGINT when we have a
70 controlling terminal and we are the head of the process group.
71
c729f227
CF
72Tue Sep 4 16:48:14 2001 Christopher Faylor <cgf@cygnus.com>
73
74 * thread.cc (InterlockedExchangePointer): Don't define if it already
75 exists.
76
37f75da2
CV
77Tue Sep 4 22:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
78
79 * uname.cc (uname): Eliminate os specific retrieving of x86
80 processor type.
81
29ebba70
CV
822001-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
83
84 * fhandler_console.cc (fhandler_console::char_command): Save the cursor
85 position relative to the top of the window.
86 * fhandler_cc (fhandler_console::write): Ditto.
87
2321ebb2
CV
88Mon Sep 3 21:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
89
90 * dir.cc (opendir): Write version information to __d_dirent->d_version.
91
a71aee46
CV
92Mon Sep 3 18:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
93
94 * cygwin.din: Add `dirfd'.
95 * dir.cc (dirfd): New function.
96 (opendir): Open a directory file descriptor and save it in
97 __d_dirent->d_fd.
98 (closedir): Close directory file descriptor.
99 * include/cygwin/version.h: Bump API minor version to 44.
100
9867ecfd
CF
101Sun Sep 2 22:09:31 2001 Christopher Faylor <cgf@cygnus.com>
102
103 * child_info.h: Modify magic number.
104 * dcrt0.cc (_cygwin_testing): Define.
105 (_dll_crt0): Set _cygwin_testing if CYGWIN_TESTING environment variable
106 exists. Don't issue "conflicting versions" error if _cygwin_testing is
107 true.
108 * shared.cc (shared_name): Use _cygwin_testing global rather than
109 testing the environment.
110 * syscalls.cc (_write): Remove debugging info.
111
2496a363
CF
112Sat Sep 1 01:37:13 2001 Christopher Faylor <cgf@cygnus.com>
113
114 * tty.cc (tty::create_inuse): Eliminate unneeded argument.
115 * tty.h: Reflect above change.
116 * fhandler_tty.cc: Reflect argument reduction in tty::create_inuse,
117 throughout. Always make inuse inheritable.
118
e62ac9e8
CF
119Sat Sep 1 01:10:07 2001 Christopher Faylor <cgf@cygnus.com>
120
121 * debug.cc (mark_closed): Rename from debug_mark_closed and make
122 static.
123 (setclexec_pid): New function for marking saved handle as
124 close-on-exec.
125 (delete_handle): New function.
126 (debug_fixup_after_fork): New function.
127 * debug.h: Declare new functions, remove obsolete ones.
128 * fork.cc (debug_fixup_after_fork): Call to cleanup close-on-exec
129 handles.
130
131 * fhandler.cc (fhandler_disk_file::close): Minor reorg.
132 (fhandler_base::set_inheritance): Set flag appropriately for debugging
133 when close-on-exec so forked process can delete closed handles.
134 * tty.h (open_output_mutex): Eliminate unneeded argument.
135 (open_input_mutex): Ditto.
136 * fhandler_tty.cc (fhandler_tty_slave::open): reflect open_*_mutex
137 argument changes.
138 * fhandler.h (fhandler_socket): Make saw_shutdown_* functions type
139 bool.
140 * tty.cc (tty::get_event): Eliminate unneeded argument.
141 (tty::common_init): Reflect change to get_event. Events should always
142 be inherited.
143
dc8c4c68
CV
144Fri Aug 31 21:39:00 2001 Corinna Vinschen <corinna@vinschen.de>
145
146 * security.cc (create_token): Change initialization of `exp' to comply
147 with new LARGE_INTEGER definition in winnt.h.
148
5ac73dfe
CF
149Fri Aug 31 13:58:51 2001 Christopher Faylor <cgf@cygnus.com>
150
151 * cygwin.sc: Revert to previous NO_COPY behavior.
152 * winsup.h: Ditto.
153 * sigproc.cc: Ditto.
154 * autoload.cc: Ditto.
155
5835f2cf
CF
156Fri Aug 31 00:56:26 2001 Christopher Faylor <cgf@cygnus.com>
157
158 * cygwin.sc: New file -- linker script for building cygwin DLL.
159 * Makefile.in: Use linker script to control location of cygheap.
160 * cygheap.cc (buckets): Make static.
161 (init_cheap): Remove special iswinnt handling. Allocate cygheap at a
162 fixed location. Display more info when allocation fails.
163 (cygheap_fixup_in_child): Try harder to move cygheap to correct
164 location. Display more info when allocation fails.
165 * fhandler.h (fhandler_socket): Add macros for tracking socket shutdown
166 state.
167 * net.cc (cygwin_shutdown): Set appropriate shutdown value for future
168 use.
169 * select.cc (select_stuff::cleanup): New method.
170 (cygwin_select): Call cleanup explicitly to avoid a race.
171 (select_stuff:~select_stuff): Call cleanup chain via cleanup method.
172 (fhandler_socket::select_read): Set *_ready when shutdown has been
173 called on the socket.
174 (fhandler_socket::select_write): Ditto.
175 (fhandler_socket::select_except): Ditto.
176
177 * winsup.h: Move NO_COPY to "COMMON" section.
178 * autoload.cc (wsock_started): Avoid initializing NO_COPY value.
179 * sigproc.cc: Remove initialization from NO_COPY variables.
180 (sigproc_init): Initialize sig_loop_wait here, rather than via
181 initialization.
182 (subproc_init): Initialize proc_loop_wait here, rather than via
183 initialization.
184
f0b4b386
CV
185Thu Aug 30 10:19:00 2001 Christopher Faylor <cgf@cygnus.com>
186
187 * select.cc (select_read): Add setting read_ready flag.
188 (select_write): Add setting write_ready flag.
189
41d53c98
CF
190Wed Aug 29 00:40:42 2001 Christopher Faylor <cgf@cygnus.com>
191
192 * path.cc (path_conv::check): Avoid splitting off leading '/' in path
193 component when building a symlink.
194
e4a17c6d
CV
195Wed Aug 29 0:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
196
197 * resource.cc (getrlimit): Return actual values on RLIMIT_STACK.
198
ffe94510
CF
199Tue Aug 28 16:37:17 2001 Christopher Faylor <cgf@cygnus.com>
200
201 * dir.cc (rmdir): Report ENOENT when file doesn't exist rather than
202 ENOTDIR.
203
8d661d36
CF
204Mon Aug 27 11:58:19 2001 Christopher Faylor <cgf@cygnus.com>
205
206 * select.cc (cygwin_select): Ensure that arguments are zeroed on
207 timeout.
208 (select_stuff::wait): Ditto.
209
e32b4e81 2102001-08-24 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
5ac73dfe 211
e32b4e81
CF
212 * syscalls.cc (check_tty_fds): New function. Check whether there is a
213 fd referring to pty slave.
214 (setsid): Don't detach console if the process has a pty slave.
215
5d0fe635
CV
216Fri Aug 24 8:54:00 2001 Corinna Vinschen <corinna@vinschen.de>
217
218 * net.cc (free_addr_list): Add define for symmetry.
219 (free_hostent_ptr): Use free_addr_list to free h_addr_list element.
220
221Thu Aug 23 16:00:09 2001 Jason Tishler <jason@tishler.net>
222
223 * net.cc (dup_addr_list): New static function.
224 (dup_hostent_ptr): Use dup_addr_list instead of dup_char_list in order
225 to handle embedded null characters.
226
ecaff08c
CF
227Wed Aug 22 22:23:14 2001 Christopher Faylor <cgf@cygnus.com>
228
229 * dtable.cc (dtable::dup2): Allow extension of fd table by dup2.
230 * syscalls.cc: Minor code cleanup.
231 (fpathconf): Check for bad fd before doing anything else.
232 * termios.cc (tcsetattr): Don't convert to new termios if bad fd.
233 (tcgetattr): Minor debugging tweak.
234
cb19ccf4
CV
235Wed Aug 22 23:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
236
237 * net.cc (cygwin_inet_ntoa): Rearrange previous patch to use
238 thread local buffer space when compiled thread safe.
239 (cygwin_getprotobyname): Ditto.
240 (cygwin_getprotobynumber): Ditto.
241 (cygwin_getservbyname): Ditto.
242 (cygwin_getservbyport): Ditto.
243 (cygwin_gethostbyname): Ditto.
244 (cygwin_gethostbyaddr): Ditto. Move near to cygwin_gethostbyname.
245 * thread.h (struct _winsup_t): Add pointers for above used buffer space.
246 * passwd.cc (getpwduid): Remove initializing passwd.
247 (setpwent): Ditto.
248 (endpwent): Ditto.
249 (setpassent): Ditto.
250
0a047e8f
CF
251Wed Aug 22 13:41:09 2001 Christopher Faylor <cgf@cygnus.com>
252
253 * smallprint.c (console_printf): New function.
254 * dcrt0.cc (dll_crt0_1): Use console_printf for debugging output.
255 * debug.cc (debug_mark_closed): New function.
256 (close_handle): Use debug_mark_closed.
257 * debug.h: Declare new functions.
258 * dtable.cc (dtable::build_fhandler): Remove unneeded extern.
259 * spawn.cc: Cosmetic changes.
260 * winsup.h: Define NO_COPY for C files, too. Declare a global.
261
1fdc8df9
CV
262Wed Aug 22 17:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
263
264 * net.cc (free_char_list): New static function.
265 (dup_char_list): Ditto.
266 (free_protoent_ptr): Ditto.
267 (dup_protoent_ptr): Ditto.
268 (free_servent_ptr): Ditto.
269 (dup_servent_ptr): Ditto.
270 (free_hostent_ptr): Ditto.
271 (dup_hostent_ptr): Ditto.
272 (cygwin_inet_ntoa): Use local static buffer to allow propagating of
273 the result to child processes.
274 (cygwin_getprotobyname): Ditto.
275 (cygwin_getprotobynumber): Ditto.
276 (cygwin_getservbyname): Ditto.
277 (cygwin_getservbyport): Ditto.
278 (cygwin_gethostbyname): Ditto.
279 (cygwin_gethostbyaddr): Ditto.
280
b1d0b907
CF
281Mon Aug 20 11:56:19 2001 Christopher Faylor <cgf@cygnus.com>
282
283 * cygheap.cc (init_cheap): Allocate cygheap in shared memory for Windows NT.
284
933cbf62
ED
285Thu Aug 16 09:38:59 2001 Jason Tishler <jason@tishler.net>
286
287 * fhandler_socket.cc (fhandler_socket::create_secret_event): Relax
288 security of secret_event so AF_UNIX socket clients can connect to
289 servers even if running under a different user account.
290 (fhandler_socket::check_peer_secret_event): Ditto.
291
1457739a
CV
292Thu Aug 16 16:26:00 2001 Corinna Vinschen <corinna@vinschen.de>
293
294 * resource.cc (getrlimit): Return getdtablesize () as current limit
295 on RLIMIT_NOFILE.
296 * syscalls.cc (getdtablesize): Return OPEN_MAX if current dtable size
297 is less than OPEN_MAX, the current dtable size otherwise.
298 * sysconf.cc (sysconf): Return getdtablesize () on _SC_OPEN_MAX.
299
3171175e
CV
300Thu Aug 16 16:17:00 2001 Corinna Vinschen <corinna@vinschen.de>
301
302 * resource.cc (getrlimit): Return OPEN_MAX as current limit
303 on RLIMIT_NOFILE.
304 * syscalls.cc (getdtablesize): Return OPEN_MAX.
305 * sysconf.cc (sysconf): Return OPEN_MAX on _SC_OPEN_MAX.
306 * include/limits.h (OPEN_MAX): Define as 256.
307
91a1423a
CV
308Wed Aug 15 12:43:00 2001 Corinna Vinschen <corinna@vinschen.de>
309
310 * times.cc (utimes): Revert previous change. Just open the
311 file using FILE_WRITE_ATTRIBUTES instead of GENERIC_WRITE
312 on NT/W2K.
313
2a9366ff
CV
314Wed Aug 15 12:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
315
316 * security.cc (set_nt_attribute): Return always -1 in case of
317 a failure.
318 * times.cc (utimes): On NTFS with ntsec ON, change the file's
319 security descriptor temporarily to acquire write access if
320 opening the file failed.
321
5fd12fb0
CV
322Wed Aug 15 9:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
323
324 * fhandler.cc (fhandler_base::is_nonblocking): New method.
325 (fhandler_base::set_nonblocking): Ditto.
326 * fhandler.h (fhandler_base): Declare new methods `is_nonblocking' and
327 `set_nonblocking'.
328 * fhandler_socket.cc (fhandler_socket::ioctl): Use `set_nonblocking'.
329 * fhandler_tty.cc (fhandler_pty_master::process_slave_output):
330 Use `is_nonblocking'.
331 (fhandler_tty_slave::read): Ditto.
332 (fhandler_tty_slave::ioctl): Use `set_nonblocking'.
333 (fhandler_pty_master::ioctl): Ditto.
334 * net.cc (cygwin_sendto): Fallback to winsock 1 functionality
335 in case of nonblocking IO.
336 (cygwin_recvfrom): Ditto.
337 (cygwin_recv): Ditto.
338 (cygwin_send): Ditto.
339 * syscalls.cc (_read): Use `is_nonblocking'.
340
3ca6bcc4
CF
341Tue Aug 14 11:05:26 2001 Christopher Faylor <cgf@cygnus.com>
342
343 * include/cygwin/version.h: Bump API version.
344
7da232ab
ED
3452001-08-14 Egor Duda <deo@logos-m.ru>
346
347 * spawn.cc (spawn_guts): Enable appropriate privilege before
348 loading user's registry hive.
349
6a574f1a
CV
350Mon Aug 13 22:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
351
352 * fhandler.cc (fhandler_base::fcntl): Use new O_NONBLOCK_MASK define.
353 * fhandler.h: Move definitions of O_NOSYMLINK, O_DIROPEN and
354 OLD_O_NDELAY from winsup.h to here. Add O_NONBLOCK_MASK define.
355 * fhandler_socket.cc (fhandler_socket::close): Add hack to allow
356 a graceful shutdown even if shutdown() hasn't been called by the
357 application. Add debug output.
358 (fhandler_socket::ioctl): Set fhandler's NONBLOCK flag according
359 to FIONBIO setting.
360 (fhandler_socket::fcntl): Use new O_NONBLOCK_MASK define. Actually
361 set `request' before using it.
362 * fhandler_tty.cc: Use new O_NONBLOCK_MASK define throughout.
363 (fhandler_tty_slave::ioctl): Set fhandler's NONBLOCK flag according
364 to FIONBIO setting.
365 (fhandler_pty_master::ioctl): Ditto.
366 * net.cc (wsock_event::prepare): Compare WSACreateEvent return code
367 with `WSA_INVALID_EVENT' according to MSDN.
368 * syscalls.cc (_read): Use new O_NONBLOCK_MASK define.
369
f11db2f4
CF
370Wed Aug 8 15:24:59 2001 Christopher Faylor <cgf@cygnus.com>
371
372 * include/wchar.h: Define __need_wint_t.
373
8c62297a
CV
374Wed Aug 8 11:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
375
376 * security.cc (alloc_sd): Revert to setting inheritance attribute for
377 permissions given to directories. Never set inheritance on NULL ACE.
378
c0ae23dc
CV
379Tue Aug 7 18:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
380
381 * security.cc (alloc_sd): Don't set FILE_DELETE_CHILD for group
382 if S_ISVTX attribute is given.
383 * dir.cc (mkdir): Allow immediate setting of S_ISUID, S_ISGID and
384 S_ISVTX attribute.
385 * syscalls.cc (_open): Ditto.
386
86fb0393
CV
387Tue Aug 7 16:24:00 2001 Corinna Vinschen <corinna@vinschen.de>
388
389 * dir.cc (mkdir): Set security attributes correctly for
390 CreateDirectoryA () call if ntsec is on. Don't call
391 set_file_attributes () then.
392 * fhandler.cc (fhandler_base::open): Ditto for CreateFileA () call.
393 * path.cc (symlink): Ditto.
394 * security.cc (set_security_attribute): New function.
395 * security.h: Add declaration for `allow_ntea' and
396 `set_security_attribute'.
397
f5e8e2be
CV
398Tue Aug 7 10:54:00 2001 Corinna Vinschen <corinna@vinschen.de>
399
5ac73dfe
CF
400 * grp.cc (class grp_check): New class. Make `group_state'
401 a member of class grp_check.
402 (read_etc_group): Free former allocated memory on reread.
403 * passwd.cc (class pwd_check): New class Make `passwd_state'
404 a member of class pwd_check.
405 (read_etc_passwd): Free former allocated memory on reread.
f5e8e2be 406
300624d4
CF
407Tue Aug 7 01:13:58 2001 Christopher Faylor <cgf@cygnus.com>
408
409 * fhandler_console.cc (get_tty_stuff): Don't initialize shared memory
410 console area if it is already initialized.
411
412 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Augment debugging
413 info.
414
96a3f4ae
CF
415Mon Aug 6 19:58:43 2001 Christopher Faylor <cgf@cygnus.com>
416
417 * cygheap.cc (cygheap_root::set): Avoid treating '/' specially.
418
419 * fhandler.cc (fhandler_base::fcntl): Only set specific O_NDELAY style
420 flag passed in from application.
421 * fhandler_socket.cc (fhandler_socket::fcntl): Ditto.
422 * fhandler.h: Set constant for future use.
423 * winsup.h: Define OLD_O_NDELAY only for old programs.
424 * include/cygwin/version.h: Define
425 CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK.
426
e5ba4c06
CF
427Sat Aug 4 16:52:03 2001 Christopher Faylor <cgf@cygnus.com>
428
429 Throughout, change check for running under Windows NT to 'iswinnt'.
430 * dcrt0.cc (set_os_type): Set 'iswinnt' appropriately.
431 * cygheap.cc (init_cheap): Revert to using VirtualAlloc for allocating
432 cygheap.
433 (cygheap_setup_for_child_cleanup): New function. Standard function to
434 call after calling CreateProcess to cleanup cygheap info passed to
435 child.
436 (cygheap_fixup_in_child): Copy cygheap from shared memory into
437 allocated space under Windows 9x or if can't relocate shared space
438 under NT.
439 * cygheap.h: Declare new function.
440 * spawn.cc (spawn_guts): Use cygheap_fixup_in_child.
441 * fork.cc (fork_parent): Ditto.
442 * winsup.h: Declare iswinnt.
443
17195d08
ED
4442001-08-04 Egor Duda <deo@logos-m.ru>
445
446 * dtable.cc (dtable::release): Avoid messing with console when
447 closing socket.
448
7eb971a5
CV
449Fri Aug 3 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
450
451 * net.cc (cygwin_accept): Allow NULL peer and len parameters.
452 * include/cygwin/socket.h: Define socklen_t as int.
453
dce6f563
CV
454Fri Aug 3 13:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
455
9867ecfd
CF
456 * path.cc (fchdir): Set the fhandler's path to absolute value to ensure
457 changing to the correct directory even if the fhandler originally
dce6f563
CV
458 points to a relative path.
459
842c741f
CV
460Thu Aug 2 17:59:00 2001 Corinna Vinschen <corinna@vinschen.de>
461
462 * security.cc (set_file_attribute): Clean up. Don't call
463 `set_nt_attribute' when ntsec isn't set.
464
e13ea334
CF
465Sat Jul 28 22:30:55 2001 Christopher Faylor <cgf@cygnus.com>
466
467 * dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal
468 with growing stack under Windows 95.
469
470Fri Jul 27 12:36:07 2001 Christopher Faylor <cgf@cygnus.com>
471
472 * Makefile.in: Add install-lib and install-headers.
473
8e4e3874
CF
474Fri Jul 27 12:28:12 2001 Christopher Faylor <cgf@cygnus.com>
475
476 * cygwin.din: Export sys_errlist, sys_nerr.
477 * include/cygwin/version.h: Bump minor version number.
478
8b43d272
CV
479Fri 27 Jul 2001 10:29:00 Corinna Vinschen <corinna@vinschen.de>
480
481 * security.cc (get_user_primary_group): Fix compiler warning.
482 (alloc_sd): Add DELETE permission for user when S_IWUSR is given.
483
f9f2c119
CF
484Thu Jul 26 16:43:39 2001 Pieter de Visser <pieterdv@knoware.nl>
485
486 * thread.cc (__pthread_equal): Invert return value so that true is
487 returned when threads are equal.
488
351a8548
CF
489Thu Jul 26 15:50:38 2001 Charles Wilson <cwilson@ece.gatech.edu>
490 Christopher Faylor <cgf@cygnus.com>
491
492 * cygwin.din: Export __signgam.
493 * include/cygwin/version.h: Bump minor version number.
494
6b91b8d5
CF
495Thu Jul 26 15:19:50 2001 Christopher Faylor <cgf@cygnus.com>
496
497 Throughout, reorganize header file inclusion to put security.h prior to
498 fhandler.h.
499 * fhandler.h (fhandler_base::get_inheritance): New method.
500 * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper
501 close-on-exec inheritance when creating.
502 (fhandler_socket::check_peer_secret_event): Create handle as
503 non-inheritable.
504
0cc642a5
CF
5052001-07-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
506
507 * syscalls.cc (setsid): Detach process from its console if the current
508 controlling tty is the console and already closed.
509 * dtable.h (class dtable): Add members to count descriptors referring
510 to the console.
511 * dtable.cc (dtable::dec_console_fds): New function to detach process
512 from its console.
513 (dtable::release): Decrement the counter of console descriptors.
514 (dtable::build_fhandler): Increment it.
515 * exception.cc (ctrl_c_handler): Send SIGTERM to myself when catch
516 CTRL_SHUTDOWN_EVENT.
517
811bf290
RC
518Tue 24 Jul 2001 02:28:00 PM Trevor Forbes <t4bs@hotmail.com>
519
520 * thread.cc (verifyable_object_isvalid): Don't validate
521 PTHREAD_MUTEX_INITIALIZER pointer as it will cause an exception
522 in IsBadWritePtr() when running GDB.
523
09ff05f7
CV
524Wed 25 Jul 2001 23:46:00 Corinna Vinschen <corinna@vinschen.de>
525
526 * localtime.c: Changed whole file to become C++ clean. Rename to
527 localtime.cc.
528 * localtime.cc (tzload): Preserve errno.
529
a7670c1e
CF
530Fri 20 Jul 2001 11:15:50 PM EDT Christopher Faylor <cgf@cygnus.com>
531
532 * cygheap.cc (cygheap_fixup_in_child): Attempt Win95 workaround.
533 * dtable.cc (dtable::dup_worker): Add debugging output.
534 (dtable::vfork_child_dup): Correctly set close_on_exec.
535 * fhandler.cc (fhandler_base::fork_fixup): Don't mess with handle if
536 there is no need to get it from the parent.
537 * fhandler_tty.cc (fhandler_tty_common::close): Add debugging output.
538
1801eae1
CV
539Fri 20 Jul 2001 09:15:00 Mark Bradshaw <bradshaw@staff.crosswalk.com>
540
541 * dir.cc (readdir): Protect FindNextFileA against INVALID_HANDLE_VALUE.
542
16828fc5
CF
543Wed 18 Jul 2001 01:00:47 PM EDT Christopher Faylor <cgf@cygnus.com>
544
545 * cygheap.cc (_cmalloc): Use correct constants for size calculation.
546 * dcrt0.cc (dll_crt0_1): Move uid initialization earlier.
547 * fork.cc (fork_parent): Move cygheap_setup_in_child to just prior to
548 CreateProcess so that all contents of cygheap are copied.
549 * spawn.cc (spawn_guts): Ditto.
550
c9fbce26
CV
551Wed 18 Jul 2001 12:54:17 Corinna Vinschen <corinna@vinschen.de>
552
553 * security.cc (get_user_groups): Call Net function with NULL server
554 name under specific error conditions.
555 (is_group_member): Ditto.
556 (get_user_local_groups): Ditto.
557 (get_user_primary_group): Ditto.
558
5564cd7a
CV
559Wed 18 Jul 2001 11:56:00 Corinna Vinschen <corinna@vinschen.de>
560
9867ecfd 561 * syscalls.cc (_unlink): Explicitly check for non-existant file.
5564cd7a 562
3ef6288c
CV
563Tue 17 Jul 2001 10:19:00 Corinna Vinschen <corinna@vinschen.de>
564
565 * delqueue.h: Remove obsolete file.
566
5457dfcb
CF
567Mon 16 Jul 2001 10:47:17 PM EDT Christopher Faylor <cgf@cygnus.com>
568
569 * child_info.h: Bump magic number.
570 (class child_info): Add an element.
571 * cygheap.cc (init_cheap): Allocate cygwin heap in shared memory area.
572 (cygheap_fixup_in_child): Map cygwin heap, passed from parent via
573 shared memory into correct address.
574 (cygheap_setup_for_child): New function.
575 * cygheap.h: Declare new functions.
576 * dcrt0.cc (dll_crt0_1): Accomodate new cygheap_fixup_in_child
577 arguments. Avoid protecting subproc_ready unless it is spawn/nowait.
578 * fork.cc (fork_parent): Use new cygheap_setup_for_child function to
579 setup cygwin heap info. Close passed cygheap shared memory handle.
580 * spawn.cc (spawn_guts): Ditto. Also, reorganize to avoid
581 synchronization between parent and child in non-P_OVERLAY case.
582 * sigproc.cc (wait_sig): Only signal subproc_ready when execing.
583
27ea31cd
CV
584Mon 16 Jul 2001 15:21:00 Corinna Vinschen <corinna@vinschen.de>
585
586 * grp.cc: Add missing Copyright date 2001.
587
3a157c0d
CV
588Mon 16 Jul 2001 00:11:00 Corinna Vinschen <corinna@vinschen.de>
589
590 Change well_known_admin_sid to well_known_admins_sid throughout.
591 * sec_acl.cc (setacl): Never set DELETE permission. Set
592 FILE_DELETE_CHILD only on readable and executable directories.
593 * sec_helper.cc: Add constructor for `well_known_null_sid'.
594 * security.cc (get_nt_attribute): Set S_ISVTX for directories if
595 FILE_WRITE_DATA and FILE_EXECUTE but not FILE_DELETE_CHILD is set.
596 Add evaluation of S_ISVTX, S_ISGID and S_ISUID from NULL ACE.
597 (alloc_sd): Never set DELETE permission. Set FILE_DELETE_CHILD
598 only on readable and executable directories.
599 Add creation of NULL ACE for S_ISVTX, S_ISGID and S_ISUID permissions.
600 * security.h: Add extern declaration for `well_known_null_sid'.
601
fc901253
CF
602Fri 13 Jul 2001 08:08:49 PM EDT Christopher Faylor <cgf@cygnus.com>
603
604 * syscalls.cc (stat_worker): Simplify previous change.
605
2aa2adb2
CF
606Fri Jul 13 13:13:09 2001 Christopher Faylor <cgf@cygnus.com>
607
608 * syscalls.cc (_unlink): Correct (?) logic which determines when
609 to report an access violation and when to queue file for eventual
610 deletion.
611 (stat_worker): Check for invalid buf argument.
612
8595942c
CV
613Tue Jul 10 23:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
614
615 * mmap.cc (fhandler_disk_file::mmap): Try to open file mappings
616 by a unified name when running under 9x/ME. If that failes, create
617 the file mapping using the unified name.
618
a8506a19
CV
619Mon Jul 9 10:43:00 2001 Corinna Vinschen <corinna@vinschen.de>
620
621 * uinfo.cc (internal_getlogin): Add pointer check.
622
5d0cbc17
CV
623Mon Jul 9 10:05:00 2001 Corinna Vinschen <corinna@vinschen.de>
624
625 * security.cc (alloc_sd): Don't set inheritance attribute for
626 permissions given to directories.
627
2113bf6c
CF
628Thu Jun 28 22:19:08 2001 Christopher Faylor <cgf@cygnus.com>
629
630 * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Return 0 for success.
631
7a4078ee
CF
632Wed Jun 27 22:19:07 2001 Christopher Faylor <cgf@cygnus.com>
633
634 * path.cc (path_conv::check): Add signal protection here since
635 retrieving info about remote shares can take some time.
636
637Wed Jun 27 23:30:00 2001 Robert Collins <rbtcollins@hotmail.com>
2aa2adb2
CF
638 Christopher Faylor <cgf@cygnus.com>
639
7a4078ee
CF
640 Change check_null_empty_path* to check_null_empty_str* throughout.
641 * path.h (check_null_empty_str_errno): Convert to a function prototype.
642 * path.cc (check_null_empty_str): Move to miscfuncs.cc.
643 * miscfuncs.cc (check_null_empty_str_errno): New function.
644 (__check_null_invalid_struct): Ditto.
645 (__check_null_invalid_struct_errno): Ditto.
646 (check_null_empty_str): Change from VirtualQuery to IsBadWritePtr.
647 * thread.cc (check_valid_pointer): Ditto.
648 * resource.cc (getrlimit): Use check_null_invalid_struct macro for
649 checking validity of pointer.
650 (setrlimit): Ditto.
651
07c3cd5b
CF
652Tue Jun 26 16:59:16 2001 Christopher Faylor <cgf@cygnus.com>
653
654 * fhandler.cc (fhandler_disk_file::fstat): Don't rely on exactly 3
655 characters being read for executable test since we could be checking
656 for less than that.
657 * syscalls.cc (stat_worker): Try opening the file the "correct" way
658 first so that #! processing can potentially happen. If that fails,
659 then use "query open" method.
660
661 * spawn.cc (spawn_guts): Delay processing of signal until after we've
662 notified parent about reparenting.
663
462f4eff
CF
664Tue Jun 26 10:47:24 2001 Christopher Faylor <cgf@cygnus.com>
665
666 * mmap.cc: Clean up *ResourceLock calls throughout.
667
668Tue Jun 26 22:10:00 2001 Robert Collins rbtcollins@hotmail.com
669
670 * thread.cc (pthread_cond::TimedWait): Check for WAIT_TIMEOUT as well
671 as WAIT_ABANDONED.
672 (__pthread_cond_timedwait): Calculate a relative wait from the abstime
673 parameter.
674
12520587
CF
675Sun Jun 24 17:38:19 2001 Christopher Faylor <cgf@cygnus.com>
676
677 * exceptions.cc (interrupt_setup): Move actions from setup_handler to
678 here.
679 (setup_handler): Move actions after a successful interrupt to
680 interrupt_setup.
681 * fork.cc (vfork): Augment debugging output.
682 * sigproc.cc (proc_subproc): Ditto.
683 * spawn.cc (spawn_guts): Ditto. Correctly fill out progname when spawn
684 NO_WAIT. Call signal handler when a signal arrives.
685 * sigproc.h: Declare a function.
686
50b12648
CV
687Fri Jun 22 16:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
688
689 * fhandler.h class fhandler_socket): Declare new method
690 `set_close_on_exec'.
691 * fhandler_socket.cc (fhandler_socket::set_close_on_exec):
692 New method.
693
3b295174
CV
694Fri Jun 22 16:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
695
696 * fhandler_tape.cc (fhandler_dev_tape::tape_erase): Set size
697 parameter to value expected by GetTapeParameters().
698
26da27a5
CV
699Thu Jun 21 22:01:39 2001 Marius Gedminas <mgedmin@delfi.lt>
700
701 * fhandler_console.cc (fhandler_console::read): Detect AltGr more
702 robustly on WinNT.
703
7333875c 7042001-06-22 Robert Collins <rbbtcollins@hotmail.com>
b643afa4 705
462f4eff 706 * thread.cc (__pthread_cond_timedwait): Lock the waiting mutex before
b643afa4
RC
707 the condition protect mutex to avoid deadlocking. (Found by Greg Smith).
708 (__pthread_cond_wait): Ditto.
32c30349 709
9cc97acb
ED
7102001-06-30 Egor Duda <deo@logos-m.ru>
711
712 * fhandler.cc (fhandler_base::open): Work around windows bug when
713 CreateFile() with dwDesiredAccess == 0 called on remote share returns
714 valid handle even if file doesn't exist.
715
ae036f47
ED
7162001-06-20 Egor Duda <deo@logos-m.ru>
717
718 * fhandler_socket.cc (fhandler_socket::signal_secret_event): New
719 function.
720 * fhandler.h: Declare it.
721 * fhandler_socket.cc (fhandler_socket::create_secret_event): Don't
722 signal secret event immediately.
723 (fhandler_socket::check_peer_secret_event): Do it after peer event
724 was opened.
725 * net.cc (cygwin_connect): Or if socket is non-blocking.
726 (cygwin_accept): Ditto.
727
20a2c443
CF
728Mon Jun 18 17:09:25 2001 Christopher Faylor <cgf@cygnus.com>
729
730 * fhandler_tty.cc (fhandler_tty_slave::init): Revert 2001-06-16 change.
731
732 * fork.cc (fork_copy): Print more debugging info.
733 (fork_parent): Change order of arguments to accomdate buggy gcc.
734 (fork): Ditto.
735
736Sun Jun 17 18:54:46 2001 Christopher Faylor <cgf@cygnus.com>
737
738 * syscalls.cc (_unlink): Reorganize to try harder to delete file with
739 DeleteFile and to recover more gracefully if FILE_FLAG_DELETE_ON_CLOSE
740 doesn't work properly.
741
99a5bd2f
CF
742Sat Jun 16 13:06:49 2001 Christopher Faylor <cgf@cygnus.com>
743
744 * exceptions.cc (sig_handle_tty_stop): Reset PID_STOPPED if not
745 actually stopping.
746 * fhandler_console.cc (fhandler_console::fixup_after_fork): Don't set
747 controlling terminal if just inheriting a handle.
748 (fhandler_console::fixup_after_exec): Ditto.
749 * fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
750 * signal.cc (kill_worker): Set appropriate errno if proc_exists
751 determines that process does not really exist.
752
947ab99e
CF
753Fri Jun 15 14:34:19 2001 Christopher Faylor <cgf@cygnus.com>
754
755 * path.cc (path_conv::check): Deal more robustly with foo/ behavior.
756
4d52d5b0
CV
757Fri Jun 15 11:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
758
759 * fhandler_tape.cc (fhandler_dev_tape::tape_status): Set size
760 parameter to value expected by GetTapeParameters().
761
e8d6e78f
CF
762Thu Jun 14 20:19:46 2001 Christopher Faylor <cgf@cygnus.com>
763
764 * fhandler.cc (fhandler_disk_file::fstat): Properly set executable bits
765 for directory when !ntsec && !ntea. Also move common code prior to
766 call to get_attributes.
767
47132198 768Fri June 15 09:25:00 Robert Collins <rbtcollins@hotmail.com>
20a2c443 769
47132198
CF
770 * thread.cc (pthread_cond::Signal): Release the condition access
771 variable correctly.
772
96d95e53
ED
7732001-06-14 Egor Duda <deo@logos-m.ru>
774
20a2c443
CF
775 * fhandler.cc (fhandler_base::open): Set win32 access flags to 0, when
776 requested.
96d95e53
ED
777 * fhandler.h: New status flag FH_QUERYOPEN.
778 (fhandler::get_query_open): New function.
779 (fhandler::set_query_open): Ditto.
780 * syscalls.cc (stat_worker): Request query-only open mode.
781
4c15b7ab
ED
7822001-06-12 Egor Duda <deo@logos-m.ru>
783
784 * environ.cc (set_file_api_mode): New function. Move setting
785 of file APIs mode (OEM/ANSI) here.
786 (codepage_init): From here.
787 * winsup.h (set_file_api_mode): Declare it.
788 * fork.cc (fork_child): Set file APIs mode in forkee.
789
f569bfcf 790Mon Jun 11 14:19:49 2001 Christopher Faylor <cgf@cygnus.com>
3ecfcf57
CF
791
792 * pinfo.cc: Use autoloaded ToolHelp functions throughout for Win9x.
793 * autoload.cc: Autoload ToolHelp functions.
794
f569bfcf
CF
795 * sigproc.cc (proc_subproc): Incorporate SIGCHLD == SIG_IGN special
796 handling of zombie processes. Ensure that zombie processes which are
797 at the end of the zombie array are properly cleaned up.
798
f375b8d9
CF
799Mon Jun 11 11:18:56 2001 Christopher Faylor <cgf@cygnus.com>
800
801 * path.cc (chdir): Fix call to path_conv constructor so that it REALLY
802 doesn't check for the null/non-empty path.
803
fc633b63
CF
804Sun Jun 10 23:34:09 2001 Christopher Faylor <cgf@cygnus.com>
805
806 * path.cc (path_conv::update_fs_info): Don't consider remote drives to
807 be NTFS. Set root_dir before invoking GetDriveType (from Kazuhiro
808 Fujieda <fujieda@jaist.ac.jp>). Eliminate extra checks for rootdir.
809
02782489
CF
810Sun Jun 10 20:19:47 2001 Christopher Faylor <cgf@cygnus.com>
811
812 * path.cc (chdir): Pre-check path for validity before eating trailing
813 space. Then, ensure that path_conv doesn't check the path for validity
814 again.
815
161edfaa
CF
816Sun Jun 10 12:56:00 2001 Christopher Faylor <cgf@redhat.com>
817
818 * exceptions.cc (sigdelayed): Ensure that signal is cleared as
819 the last operation or suffer races.
820 * sigproc.cc (proc_subproc): Deal with zombie array overflow.
821
463513f0
CV
822Sun Jun 10 11:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
823
824 * cygwin.din: Add fchdir symbols.
825 * path.cc (chdir): Guard against invalid parameter.
826 (fchdir): New function.
827 * include/cygwin/version.h: Bump API minor version to 40.
828 * uinfo.cc (internal_getlogin): Remove unused variable.
829
d4217d56
CV
830Sat Jun 9 23:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
831
832 * syscalls.cc (seteuid): Set environment variables USERNAME and
833 USERDOMAIN before impersonation to workaround a LookupAccountSid()
834 misbehaviour.
835 * uinfo.cc (internal_getlogin): Revert most of the previous change.
836 Don't set environment variables USERNAME and USERDOMAIN. That's
837 the job of seteuid() now. Try to get logon server from Lsa
838 only if logon server isn't already known.
839
56918810
CF
840Thu Jun 7 15:54:32 2001 Robert Collins <rbtcollins@hotmail.com>
841
842 * thread.cc (pthread_cond::Broadcast): Don't print error messages on
843 invalid mutexs - user programs are allowed to call
844 pthread_cond_broadcast like that.
845 (__pthread_cond_timedwait): Initialise themutex properly.
846 (__pthread_cond_wait): Initialise themutex properly.
847
235661a3
CV
848Tue Jun 5 19:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
849
850 * fhandler_console.cc (fhandler_console::dup): Allocate space for
851 savebuf on Cygwin heap.
852 (fhandler_console::char_command): Ditto. Use correct values for size.
853
149da470
ED
8542001-06-05 Egor Duda <deo@logos-m.ru>
855
856 * security.h (NTWriteEA): Change prototype.
857 * ntea.cc (NTReadEA): Don't check for global ntea setting, now
858 it's caller responsibility.
859 (NTWriteEA): Ditto.
860 * security.cc (get_file_attribute): Read attribute from EA only
861 if 'ntea' is enabled.
862 (set_file_attribute): Ditto.
863 * path.h: (class path_conv): Add members to store file system
864 information.
865 (path_conv::get_drive_type): New function.
866 * syscalls.cc (stat_worker): Use it.
867 * path.cc (path_conv::update_fs_info): New functions.
868 (path_conv::check): Get file system information from device where
869 file resides. On NTFS, try to read symlink contents from EA.
870 (get_symlink_ea): New function.
871 (set_symlink_ea): Ditto.
872 (symlink): Store symlink in extended attribute, if possible.
873
fa821be3
CV
874Tue Jun 5 11:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
875
876 * fhandler.cc (fhandler_disk_file::fstat): Always reset file position
877 to original value after checking for executable magic.
878
f7fa593d
CV
879Mon Jun 4 16:21:00 2001 Corinna Vinschen <corinna@vinschen.de>
880
881 * cygheap.h (cygheap_user::cygheap_user): Initialize token to
882 INVALID_HANDLE_VALUE.
883 * uinfo.cc (uinfo_init): Close token handle if needed.
884
ac5561f2
CF
885Sun Jun 3 20:52:13 2001 Christopher Faylor <cgf@cygnus.com>
886
887 * path.cc (normalize_posix_path): Revert .. check removed by previous
888 changes.
889 * cygheap.h: Temporarily declare path_prefix_p here.
890
9f13167f
CV
891Mon Jun 4 0:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
892
893 * net.cc (wsock_event): Add destructor.
894
aa7a6112
CF
895Sun Jun 3 09:49:55 2001 Robert Collins <rbtcollins@hotmail.com>
896
897 * dlfcn.cc (dlclose): Do not call FreeLibrary if the symbol to close
898 was obtained by dlopen(NULL,...).
899
77d13021
CF
900Sat Jun 2 23:11:52 2001 Christopher Faylor <cgf@cygnus.com>
901
902 * syscalls.cc (sleep): Try to be a little more accomodating of signal
903 arrival. Ensure that the signal handler is called.
904
7ceb1cac
CF
905Sat Jun 2 14:07:28 2001 Christopher Faylor <cgf@cygnus.com>
906
9867ecfd 907 * cygheap.cc (cygheap_root::cygheap_root): Remove constructor.
7ceb1cac
CF
908 (cygheap_root::~cygheap_root): Remove destructor.
909 (cygheap_root::operator =): Remove.
910 (cygheap_root::set): New method.
911 * cygheap.h (cygheap_root): Reflect above changes. Store root info in
912 mount-like structure.
913 (cygheap_root:posix_ok): New method.
914 (cygheap_root::ischroot_native): Ditto.
915 (cygheap_root::unchroot): Ditto.
916 (cygheap_root::exists): Ditto.
917 (cygheap_root::posix_length): Ditto.
918 (cygheap_root::posix_path): Ditto.
919 (cygheap_root::native_length): Ditto.
920 (cygheap_root::native_path): Ditto.
921 * dir.cc (opendir): Remove special chroot test.
922 * path.cc (path_prefix_p): Remove front end.
923 (normalize_posix_path): Reorganize chroot tests to accomodate new
924 convention of allowing paths using posix chroot prefix.
925 (path_conv::check): Pass a "already ran normalize" option to
926 conv_to_win32_path. Return if there is an error from this function.
927 (mount_info::conv_to_win32_path): Add extra argument. Don't call
928 normalize_posix_path if caller has already done so. Substitute chroot
929 setting, if any, for root translation. Add chroot checking to final
930 output step.
931 * shared_info (mount_info): Accomodate additional argument to
932 conv_to_win32_path.
933 * syscalls.cc (chroot): Store both normalized posix path and native
934 path in chroot.
935
bb825147
CF
936Fri Jun 1 10:57:19 2001 Christopher Faylor <cgf@cygnus.com>
937
938 * path.cc (chdir): Really make sure that isspace gets only an unsigned
939 char.
940
bc28fe95
CV
941Fri Jun 1 13:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
942
943 * syscalls.cc (_rename): Handle the case that `foo' is renamed to
944 `bar' while `bar.lnk' is an existing shortcut-symlink.
945
1de19751
CF
946Thu May 31 15:57:57 2001 Christopher Faylor <cgf@cygnus.com>
947
948 * fhandler.cc (fhandler_disk_file::fstat): Avoid clearing S_IFMT bits
949 since we've already pre-cleared everything anyway.
950
ecfb6f11
CF
951Wed May 30 23:51:32 2001 Earnie Boyd <earnie_boyd@yahoo.com>
952
953 * path.cc (chdir): Always send unsigned chars to isspace since newlib's
954 isspace doesn't deal well with "negative" chars.
955
956Wed May 30 23:51:32 2001 Christopher Faylor <cgf@cygnus.com>
957
958 * fhandler.cc (fhandler_disk_file::open): Propagate remote status of
959 file garnered from path_conv. Move #! checking to fstat.
960 (fhandler_disk_file::fstat): Reorganize st_mode setting to eliminate
961 duplication. Move check for #! here from fhandler::open.
962
963 * fhandler.h (fhandler_base::isremote): New method.
964 (fhandler_base::set_isremote): Ditto.
9867ecfd
CF
965 (fhandler_base::set_execable_p): Also record "don't care if executable
966 state".
ecfb6f11
CF
967 (fhandler_base::dont_care_if_execable): New method.
968 * path.cc (path_conv::check): Clear new flags. Appropriately set
969 vol_flags, drive_type, and is_remote_drive.
970 * path.h: Add new flags and methods for manipulating them.
971 * syscalls.cc (_unlink): Use isremote() to determine if a path is
972 remote rather than calling GetDriveType.
973 (stat_worker): Ditto.
974 * security.cc (get_file_attribute): Or attribute with result of
975 NTReadEA to be consistent with get_nt_attribute.
976
b2939a81
CV
977Tue May 29 19:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
978
979 * sec_helper.cc (cygsid::getfrompw): Change parameter to `const'.
980 (cygsid::getfromgr): Ditto.
981 * security.cc: Use `sys_mbstowcs' and `sys_wcstombs' throughout.
982 (extract_nt_dom_user): Try to get user and domain from SID in
983 pw->pw_gecos first.
984 * security.h (class cygsid): Change parameter of getfrompw() and
985 getfromgr() to `const'.
986 * uinfo.cc (internal_getlogin): Change order for evaluating user
987 information in winNT case. Drop usage of NetWkstaUserGetInfo().
988
989Mon May 28 21:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
792ca1c2
CV
990
991 * shortcut.c (check_shortcut): Treat only Cygwin shortcuts as symlinks.
992
b9ce8140
CF
993Fri May 25 11:07:07 2001 Christopher Faylor <cgf@cygnus.com>
994
995 * path.cc (symlink_info::check): Correctly set 'ext_tacked_on'. Use
996 this to determine if user specified 'foo.lnk' explicitly. Reorganize
997 slightly to get rid of one goto.
998
fdc5ebe9
CV
999Fri May 25 10:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
1000
1001 * path.cc (symlink_info::check): Add a check to return correctly
1002 if incoming `*.lnk' file is not a symlink.
1003
86f41a09
CF
1004Thu May 24 15:46:50 2001 Christopher Faylor <cgf@cygnus.com>
1005
1006 * path.cc (slash_drive_prefix_p): Remove.
1007 (mount_info::slash_drive_to_win32_path): Ditto.
1008 (mount_info::conv_to_win32_path): Remove slash drive prefix check.
1009 (mount_info::add_item): Ditto.
1010 (mount_info::del_item): Ditto.
1011 * shared_info.h (mount_info): Remove slash_drive_to_win32_path
1012 declaration.
1013
52cd2f88
CF
1014Thu May 24 01:17:33 2001 Christopher Faylor <cgf@cygnus.com>
1015
1016 * exceptions.cc (handle_exceptions): Bump repeat count for debugging
1017 kick out.
1018
1019 * fhandler.h (fhandler_dev_dsp): Add a fixup_after_exec.
1020 * fhandler_dsp.cc (class Audio): Add TOT_BLOCK_SIZE to enum.
1021 (operator new): New.
1022 (bigwavebuffer): Declare using TOT_BLOCK_SIZE to avoid buffer overruns.
1023 (Audio::Audio): Optimize slightly.
1024 (fhandler_dev_dsp::open): Allocate s_audio using static buffer.
1025 (fhandler_dev_dsp::fixup_after_exec): New function. Ditto.
1026
7b9a10a6
CV
1027Wed May 23 17:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
1028
1029 * syscalls.cc (seteuid): Restrict overriding external provided
1030 user tokens to ntsec. Don't test external tokens for primary
1031 group to evaluate if it should be overridden. Restrict creating
1032 internal tokens to ntsec.
1033
07d08883
CV
1034Wed May 23 10:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
1035
1036 * syscalls.cc (chown_worker): Don't check for ENOSYS.
1037
43a19043
CF
1038Tue May 22 12:20:07 2001 Christopher Faylor <cgf@cygnus.com>
1039
1040 * signal.cc (sleep): Protect with sigframe.
1041
e7e956a7
CV
1042Tue May 22 17:58:00 2001 Corinna Vinschen <corinna@vinschen.de>
1043
1044 * security.cc (get_file_attribute): Don't set errno.
1045
7cef8b61
CF
1046Mon May 21 15:08:00 2001 Christopher Faylor <cgf@cygnus.com>
1047
1048 * configure.in: Allow --enable-newvfork to turn NEWVFORK on and off.
1049 * configure: Regenerate.
1050
f01fb5e7
CF
1051Mon May 21 11:46:01 2001 Christopher Faylor <cgf@cygnus.com>
1052
1053 * include/cygwin/version.h: Bump minor version number.
1054
1b72f36e
CF
1055Sun May 20 13:26:25 2001 Christopher Faylor <cgf@cygnus.com>
1056
1057 * fhandler_dsp.cc: Reformat to GNU standards.
1058 (s_audio): Change to a pointer throughout.
1059 (fhandler_dev_dsp::open): Initialize s_audio, if required.
1060
1fcc912f
CV
1061Sat May 19 23:40:00 2001 Corinna Vinschen <corinna@vinschen.de>
1062
1063 * autoload.cc: Add load statements for `LookupAccountNameW',
1064 `LsaClose', `LsaEnumerateAccountRights', `LsaFreeMemory',
1065 `LsaOpenPolicy', `LsaQueryInformationPolicy', `NetLocalGroupEnum',
1066 `NetLocalGroupGetMembers', `NetServerEnum', `NetUserGetGroups' and
1067 `NtCreateToken'.
1068 * ntdll.h: Add declaration for `NtCreateToken'.
1069 * sec_helper.cc: Add `well_known_local_sid', `well_known_dialup_sid',
1070 `well_known_network_sid', `well_known_batch_sid',
1071 `well_known_interactive_sid', `well_known_service_sid' and
1072 `well_known_authenticated_users_sid'.
1073 (cygsid::string): Define as const method.
1074 (cygsid::get_sid): Set psid to NO_SID on error.
1075 (cygsid::getfromstr): Ditto.
1076 (cygsid::getfrompw): Simplify.
1077 (cygsid::getfromgr): Check for gr == NULL.
1078 (legal_sid_type): Move to security.h.
1079 (set_process_privilege): Return -1 on error, otherwise 0 or 1 related
1080 to previous privilege setting.
1081 * security.cc (extract_nt_dom_user): Remove `static'.
1082 (lsa2wchar): New function.
1083 (open_local_policy): Ditto.
1084 (close_local_policy): Ditto.
1085 (get_lsa_srv_inf): Ditto.
1086 (get_logon_server): Ditto.
1087 (get_logon_server_and_user_domain): Ditto.
1088 (get_user_groups): Ditto.
1089 (is_group_member): Ditto.
1090 (get_user_local_groups): Ditto.
1091 (sid_in_token_groups): Ditto.
1092 (get_user_primary_group): Ditto.
1093 (get_group_sidlist): Ditto.
1094 (get_system_priv_list): Ditto.
1095 (get_priv_list): Ditto.
1096 (get_dacl): Ditto.
1097 (create_token): Ditto.
1098 (subauth): Return immediately if SE_TCB_NAME can't be assigned.
1099 Change all return statements in case of error to jumps to `out'
1100 label. Add `out' label to support cleanup.
1101 * security.h: Add extern declarations for `well_known_local_sid',
1102 `well_known_dialup_sid', `well_known_network_sid',
1103 `well_known_batch_sid', `well_known_interactive_sid',
1104 `well_known_service_sid' and `well_known_authenticated_users_sid'.
1105 Add extern declarations for functions `create_token',
1106 `extract_nt_dom_user' and `get_logon_server_and_user_domain'.
1107 (class cygsid): Add method `assign'. Change operator= to call new
1108 `assign' method. Add `debug_print' method.
1109 (class cygsidlist): New class.
1110 (legal_sid_type): Moved from sec_helper.cc to here.
1111 * spawn.cc (spawn_guts) Revert reversion of previous patch.
1112 Call `RevertToSelf' and `ImpersonateLoggedOnUser' instead of `seteuid'
1113 again.
1114 * syscalls.cc (seteuid): Rearranged. Call `create_token' now when
1115 needed. Call `subauth' if `create_token' fails. Try setting token
1116 owner and primary group only if token was not explicitely created
1117 by `create_token'.
1118 * uinfo.cc (internal_getlogin): Try harder to generate correct user
1119 information. Especially don't trust return value of `GetUserName'.
1120
975d2083
CF
1121Sat May 19 21:16:07 2001 Christopher Faylor <cgf@cygnus.com>
1122
1123 * fork.cc (fork_parent): Move atforkprepare call here.
1124 (fork): From here.
1125
69fb3121
CV
1126Sat May 19 18:35:00 2001 Corinna Vinschen <corinna@vinschen.de>
1127
1128 * autoload.cc: Add missing load statement for `CancelIo'.
1129
87f0d5ad
CF
1130Sat May 19 01:22:43 2001 Christopher Faylor <cgf@cygnus.com>
1131
1132 * grp.cc (read_etc_group): Don't copy mutex on fork.
1133 * pwd.cc (read_etc_passwd): Ditto.
1134 * autoload.cc (LoadDLLfuncEx): Use LoadDLLprime to initialize DLL
1135 specific area.
1136
0260054a
CV
1137Fri May 18 10:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
1138
1139 * net.cc (wsock_event::wait): Explicitely cancel IO when a signal
1140 arrived to avoid data loss. Fallback to blocking IO when canceling
1141 fails.
1142
42938841
CV
1143Thu May 17 15:29:00 2001 Corinna Vinschen <corinna@vinschen.de>
1144
1145 * security.cc (cygwin_set_impersonation_token): Never destroy
1146 previous token object.
1147 (subauth): Create token source with well defined identifier.
1148
1cec7241
CV
1149Wed May 16 23:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
1150
1151 * uinfo.cc (uinfo_init): Just set user token to INVALID_HANDLE_VALUE.
1152 Token value is already invalid at that point.
1153
3065afdb
CV
1154Wed May 16 21:34:00 2001 Fred Yankowski <fred@ontosys.com>
1155
1156 * net.cc (errmap): Add missing mapping from WSAEINTR to EINTR.
1157
48621257
CV
1158Wed May 16 09:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
1159
1160 * sec_helper.cc (legal_sid_type): Fix conditional. Change to
1161 inline function.
1162
d61b1993
CF
1163Wed May 16 01:01:48 2001 Christopher Faylor <cgf@cygnus.com>
1164
1165 * autoload.h: Eliminate.
1166 * autoload.cc: Pull in autoload.h. Eliminate many macros. Rewrite to
1167 avoid necessity of initialization routines. Just use a standard one.
1168 (wsock_init): New function. Moved from net.cc.
1169 * net.cc (wsock_init): Move to autoload.cc.
1170 (wsadata): Make global.
1171 * dtable.cc (dtable::build_fhandler): Use more reliable method for
1172 checking if net stuff has been loaded.
1173
2b0a111f
CV
1174Tue May 15 19:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
1175
1176 * fork.cc (fork): Eliminate superfluous call to getuid().
1177 * security.h: New define `NO_SID'. Remove declarations of functions
1178 moved to methods into class cygsid.
1179 (class cygsid): Declare new methods `getfromstr', `get_sid',
1180 `getfrompw', `getfromgr', `get_rid', `get_uid', `get_gid', `string'
1181 and new constructors and operators =, == and !=.
1182 Declare new global cygsids `well_known_XXX_sid' substituting the
1183 corresponding `get_XXX_sid' functions. Remove declarations of
1184 these functions.
1185 * sec_helper.cc (well_known_admin_sid): New global variable.
1186 (well_known_system_sid): Ditto
1187 (well_known_creator_owner_sid): Ditto
1188 (well_known_world_sid): Ditto
1189 (cygsid::string): New method, substituting `convert_sid_to_string_sid'.
1190 (cygsid::get_sid): New method, substituting `get_sid'.
1191 (cygsid::getfromstr): New method, substituting
1192 `convert_string_sid_to_sid'.
1193 (cygsid::getfrompw): New method, substituting `get_pw_sid'.
1194 (cygsid::getfromgr): New method, substituting `get_gr_sid'.
1195 (cygsid::get_id): New method, substituting `get_id_from_sid'.
1196 (get_admin_sid): Eliminated.
1197 (get_system_sid): Ditto.
1198 (get_creator_owner_sid): Ditto.
1199 (get_world_sid): Ditto.
1200 * grp.cc: Use new cygsid methods and well known sids throughout.
1201 * registry.cc: Ditto.
1202 * sec_acl.cc: Ditto.
1203 * security.cc: Ditto.
1204 * shared.cc: Ditto.
1205 * syscalls.cc (seteuid): Ditto. Eliminate redundant conditional.
1206 * uinfo.cc (internal_getlogin): Ditto.
1207 * spawn.cc (spawn_guts) Revert previous patch.
1208
de81c046
CV
1209Tue May 15 10:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
1210
1211 * fhandler_socket.cc (fhandler_socket::ioctl): Convert s_addr
1212 field to host byte order before comparing with INADDR_LOOPBACK.
1213
a2cdb048
CV
1214Tue May 15 9:03:00 2001 Corinna Vinschen <corinna@vinschen.de>
1215
1216 * autoload.cc: Add autoload statements for ws2_32 functions
1217 `WSACloseEvent', `WSACreateEvent', `WSAGetOverlappedResult',
1218 `WSARecv', `WSARecvFrom', `WSASend', `WSASendTo' and `WSASetEvent',
1219 `WSAWaitForMultipleEvents'.
1220 * net.cc: Define wsock_evt.
1221 (wsock_event): New class.
1222 (cygwin_sendto): Use overlapped socket io if available.
1223 (cygwin_recvfrom): Ditto.
1224 (cygwin_recv): Ditto.
1225 (cygwin_send): Ditto.
1226 * security.cc (subauth): Set Win32 error to 0 to safely ask for the
1227 error code of dynamically loaded function `LsaRegisterLogonProcess'.
1228
7ede23a1
CF
1229Mon May 14 15:37:29 2001 Christopher Faylor <cgf@cygnus.com>
1230
1231 * errno.cc (_sys_errlist): Add missing commas.
1232
5aac6665
CV
1233Mon May 14 16:13:00 2001 Corinna Vinschen <corinna@vinschen.de>
1234
1235 * security.cc (subauth): Check if Secur32.dll could be loaded.
1236
df7320e1
CF
1237Sun May 13 22:49:04 2001 Christopher Faylor <cgf@cygnus.com>
1238
1239 * path.cc (path_conv::check): Revert allow_ntsec check so that volume
1240 info is always retrieved and isdisk setting is properly set.
1241
49a8c92c
CF
1242Sun May 13 14:02:36 2001 Christopher Faylor <cgf@cygnus.com>
1243
1244 * fhandler_tty.cc (fhandler_tty_common::dup): Preserve O_NOCTTY when
1245 duping a filehandle.
1246
cbedbdd0
CV
1247Sat May 12 18:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
1248
1249 * dir.cc (rmdir): Rearrange slightly to allow removing directories
1250 even when R/O attribute is set.
1251
c3a245f5
CF
1252Fri May 11 16:53:38 2001 Christopher Faylor <cgf@cygnus.com>
1253
1254 * external.cc (fillout_pinfo): Use correct pids.
1255 * path.cc (mount_info::conv_to_win32_path): Correct test for whether to
1256 include a slash.
1257
5bba0cb5
CF
1258Fri May 11 01:04:17 2001 Christopher Faylor <cgf@cygnus.com>
1259
1260 * exceptions.cc (handle_exceptions): Don't print message when executing
1261 from a cygwin program.
1262
723190cf
CF
12632001-05-10 Egor Duda <deo@logos-m.ru>
1264 Christopher Faylor <cgf@redhat.com>
1265
1266 * environ.cc (winenv): Always add SYSTEMDRIVE and SYSYEMROOT to
1267 win32-style environment if they don't already exist.
1268
cedb00be 12692001-05-10 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
d61b1993 1270
cedb00be
CF
1271 * path.cc (mount_info::conv_to_win32_path): Treat UNC paths the same as
1272 paths including `:' or `\'.
1273
cd94b71c
CF
1274Wed May 9 14:46:32 2001 Christopher Faylor <cgf@cygnus.com>
1275
1276 * fhandler.h (fhandler_termios::echo_erase): Declare new method.
1277 * fhandler_termios.cc (fhandler_termios::echo_erase): New method for
1278 echoing erase characters.
1279 (fhandler_termios::line_edit): Check the echo flag before echoing
1280 control characters (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>).
1281
00b59ce9
CF
1282Wed May 9 10:43:30 2001 Christopher Faylor <cgf@cygnus.com>
1283
1284 * include/pthread.h: Remove C++ comment.
1285
79201150
CF
1286Tue May 8 11:09:59 2001 Christopher Faylor <cgf@cygnus.com>
1287
1288 * cygheap.cc (_cfree): Add regparm attribute.
1289 (_crealloc): Ditto.
1290
1291 * dcrt0.cc (dll_crt0_1): Default to always checking for executable for now.
1292
1293 * dtable.cc (dtable::not_open): Move method.
1294 * dtable.h (dtable): Here.
1295
1296 * exceptions.cc (ctrl_c_handler): Don't expect process group leader to
1297 handle a signal if it doesn't exist.
1298
1299 * fhandler.h (fhandler_base): Make openflags protected.
1300
1301 * localtime.c (tzsetwall): Check for __CYGWIN__ as well as __WIN32__.
1302
1303 * path.cc (path_conv::check): Add some comments. Change strcat to assignment.
1304
1305 * lib/_cygwin_S_IEXEC.cc (_cygwin_bob__): Eliminate.
1306
1307 * fhandler_tty.cc (fhandler_console::dup): Set controlling terminal if necessary.
1308 * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
1309
ef8b6590
CF
1310Mon May 7 21:33:17 2001 Christopher Faylor <cgf@cygnus.com>
1311
1312 * include/sys/file.h: Revert special X_OK usage. Just make it a
1313 constant.
1314
68ebd3f6 1315Sun May 6 17:05:00 2001 Robert Collins <rbtcollins@hotmail.com>
ef8b6590
CF
1316
1317 * thread.h (pthread_cond): New element cond_access to allow atomic
1318 broadcasts.
68ebd3f6
RC
1319 * thread.cc (pthread_cond::pthread_cond): Initialise cond_access.
1320 (pthread_cond::~pthread_cond): Destroy cond_access.
1321 (pthread_cond::Broadcast): Use cond_access.
1322 (pthread_cond::Signal): Use cond_access.
1323 (pthread_cond_wait): Use cond_access.
1324 (pthread_cond_timedwait): Use cond_access.
1325
2bfb9665
CF
1326Sun May 6 11:55:40 2001 Christopher Faylor <cgf@cygnus.com>
1327
1328 * string.h (cygwin_strchr): Make 'static inline' so that things will
1329 still work when optimized.
1330
11ba5ef4
CF
1331Sat May 5 01:04:11 2001 Christopher Faylor <cgf@cygnus.com>
1332
1333 * exceptions.cc (handle_exceptions): Vastly increase test for exception
1334 loop guard variable.
1335
f598d941
CF
1336Fri May 4 22:23:33 2001 Christopher Faylor <cgf@cygnus.com>
1337
1338 * exceptions.cc (stack_info): Add some controls.
1339 (stack_info::init): Add extra arguments to control method of
1340 initialization.. If we have a known good frame, set things up so that
1341 this frame is not skipped the first time through. Record whether
1342 caller cares about arguments or not.
1343 (stack_info::walk): Don't store arguments if they're unwanted.
1344 (stackdump): Add isexception parameter for use when called by exception
1345 handler.
1346 (cygwin_stackdump): Accomodate extra argument to stackdump.
1347 (handle_exceptions): Ditto.
1348 (sig_handle): Ditto.
1349 (interrupt_on_return): Accomodate extra arguments to stack walk
1350 initialization.
1351
d7490eaa
CF
1352Fri May 4 21:05:20 2001 Christopher Faylor <cgf@cygnus.com>
1353
1354 * localtime.c: Revert exclusion of windows.h.
1355
6731c77e
CF
1356Fri May 4 17:03:16 2001 Christopher Faylor <cgf@cygnus.com>
1357
1358 * string.h: Fix last-minute typo.
1359
63b61cd1
CF
1360Fri May 4 16:49:34 2001 Christopher Faylor <cgf@cygnus.com>
1361
1362 * pinfo.h: Correctly set __SIGOFFSET.
1363
1364 * path.cc (hash_path_name): Avoid calling library functions for simple
1365 copying of characters.
1366
1367 * shortcut.c: Use WIN32_LEAN_AND_MEAN.
1368 * smallprint.c: Ditto.
1369
1370 * environ.cc (getwinenv): Minor clarity fix.
1371
1372 * localtime.c: No need to include windows.h
1373
1374 * string.h: New file.
1375
17743fbc
CF
1376Fri May 4 16:37:30 2001 Christopher Faylor <cgf@cygnus.com>
1377
1378 * exceptions.cc (ctrl_c_handler): Always send signal to process if it
1379 has no tty.
1380
69b218bf
ED
13812001-05-04 Egor Duda <deo@logos-m.ru>
1382
1383 * fhandler_socket.cc (set_connect_secret): Use /dev/urandom to
1384 generate secret cookie.
1385
620dd06d
CF
1386Thu May 3 16:37:55 2001 Christopher Faylor <cgf@cygnus.com>
1387
1388 * include/pthread.h (pthread_cleanup_push): Eliminate space preceding
1389 arguments.
1390 (pthread_cleanup_pop): Ditto.
1391
6c22ecdd
CV
1392Thu May 3 18:16:00 2001 Corinna Vinschen <corinna@vinschen.de>
1393
1394 * net.cc (wsock_init): Rename `was_in_progress' to `wsock_started'
1395 for clearness.
1396
70c7f359
CF
1397Thu May 3 10:44:16 2001 Christopher Faylor <cgf@cygnus.com>
1398
1399 * exceptions.cc (handle_exceptions): Break out of "loop" if the
1400 debugger doesn't seem to be attaching to our process.
1401
a6a0193b
CV
1402Wed May 2 20:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
1403
1404 * autoload.cc: Use new definition of LoadDLLinitfunc throughout.
1405 Redefine wrapper for wsock32.dll and ws2_32.dll.
1406 (std_dll_init): New function.
1407 * autoload.h: Rename LoadDLLinitfunc to LoadDLLinitfuncdef.
1408 Add new defines LoadDLLinitfunc and LoadDLLstdfunc.
1409 * net.cc (wsock_init): Add guard variable handling. Take care
1410 to call WSAStartup only once. Load WSAStartup without using
1411 autoload wrapper to eliminate recursion. Eliminate FIONBIO
1412 and srandom stuff.
1413
4c265f4a
CF
1414Tue May 1 01:26:15 2001 Christopher Faylor <cgf@cygnus.com>
1415
1416 * path.cc (mount_info::conv_to_win32_path): More path tweaking.
1417
beab320f
CF
1418Tue May 1 00:34:46 2001 Christopher Faylor <cgf@cygnus.com>
1419
1420 * path.cc (mount_info::conv_to_win32_path): Fix debugging output to
1421 avoid a SIGSEGV. Avoid double backslashes in middle of filename.
1422
d3c7e9de
CF
1423Mon Apr 30 21:51:14 2001 Christopher Faylor <cgf@cygnus.com>
1424
1425 * path.cc (mkrelpath): New function.
1426 (mount_info::conv_to_win32_path): Eliminate now-unneeded relative path
1427 name arg and processing.
1428 (path_conv::check): Accomodate relative path names again. Accomodate
1429 one extra argument in mount_info::conv_to_win32_path. Tack trailing
1430 slash on end of relative path as a side effect, like before.
1431 * shared_info.h (mount_info::conv_to_win32_path): Reflect new argument
1432 ordering.
1433
57ff940d
CV
1434Mon Apr 30 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
1435
1436 * autoload.cc: Add LoadDLLinitfunc for secur32.dll.
1437 Add LoadDLLfuncEx statements for AllocateLocallyUniqueId@4,
d61b1993 1438 DuplicateTokenEx@24, LsaNtStatusToWinError@4,
57ff940d
CV
1439 LsaDeregisterLogonProcess@4, LsaFreeReturnBuffer@4,
1440 LsaLogonUser@56, LsaLookupAuthenticationPackage@12,
1441 LsaRegisterLogonProcess@12,
1442 * environ.cc: Add extern declaration for `subauth_id'.
1443 (subauth_id_init): New function for setting `subauth_id'.
1444 (struct parse_thing): Add entry for `subauth_id'.
1445 * fork.cc (fork_parent): Call `RevertToSelf' and
1446 `ImpersonateLoggedOnUser' instead of `seteuid'.
1447 * security.cc: Define global variable `subauth_id'.
1448 (extract_nt_dom_user): New function.
1449 (cygwin_logon_user): Call `extract_nt_dom_user' now.
1450 (str2lsa): New static function.
1451 (str2buf2lsa): Ditto.
1452 (str2buf2uni): Ditto.
1453 (subauth): Ditto.
1454 * security.h: Add prototype for `subauth'.
1455 * spawn.cc (spawn_guts): Use cygheap->user.token only if impersonated.
1456 Use `cygsid' type. Remove impersonation before allowing access to
1457 workstation/desktop to everyone. Call `RevertToSelf' and
1458 `ImpersonateLoggedOnUser' instead of `seteuid'.
1459 * syscalls.cc (seteuid): Rearranged to allow using subauthentication
1460 to retrieve user tokens when needed.
1461
965cecdf
CV
1462Mon Apr 30 20:26:00 2001 Corinna Vinschen <corinna@vinschen.de>
1463
1464 * uinfo.cc (internal_getlogin): Formatting change.
1465
17db1105
CV
1466Mon Apr 30 19:58:00 2001 Corinna Vinschen <corinna@vinschen.de>
1467
1468 * grp.cc: Eliminate MAX_DOMAIN_NAME define.
1469 (read_etc_group): Substitute MAX_DOMAIN_NAME by
1470 INTERNET_MAX_HOST_NAME_LENGTH.
1471 * passwd.cc (parse_pwd): Don't force pw_name to be lower case.
1472 * sec_helper.cc: Substitute MAX_USER_NAME by UNLEN,
1473 MAX_COMPUTERNAME_LENGTH by INTERNET_MAX_HOST_NAME_LENGTH throughout.
1474 (lookup_name): Slight cleanup.
1475 * security.cc (alloc_sd): Substitute MAX_USER_NAME by UNLEN.
1476 * security.h: Define DEFAULT_UID as DOMAIN_USER_RID_ADMIN and
1477 DEFAULT_GID as DOMAIN_ALIAS_RID_ADMINS.
1478 * shared.cc (memory_init): Substitute MAX_USER_NAME by UNLEN.
1479 * thread.h: Ditto.
1480 * uinfo.cc (internal_getlogin): Substitute MAX_USER_NAME by UNLEN.
1481 Substitute MAX_COMPUTERNAME_LENGTH and MAX_HOST_NAME by
1482 INTERNET_MAX_HOST_NAME_LENGTH.
1483 * winsup.h: Include lmcons.h. Eliminate MAX_USER_NAME and
1484 MAX_HOST_NAME. Move DEFAULT_UID and DEFAULT_GID to security.h.
1485
c0a45b92
CF
1486Mon Apr 30 12:35:40 2001 Christopher Faylor <cgf@cygnus.com>
1487
1488 * path.cc (path_conv::check): Don't use path_flags when converting to
1489 MS-DOS syntax unless parsing tail of path component. Stop parsing path
1490 when we reach the 'root' of the path. Correctly copy tail to path
1491 component.
1492
8abeff1e
CF
1493Sun Apr 29 22:28:06 2001 Christopher Faylor <cgf@cygnus.com>
1494
1495 * exceptions.cc (INIT_EXCEPTION_HANDLER): Eliminate.
1496 (init_exceptions): Just use init_exception_handler.
1497 (open_stackdumpfile): New function.
1498 (stack_info::first_time): Eliminate.
1499 (stack_info::init): Set up fields to avoid "first_time" consideration.
1500 (stack_info::walk): Remove "first_time" consideration.
1501 (stackdump): Change arguments to accept initial frame pointer and open
1502 stack file flag.
1503 (stack): Eliminate.
1504 (cygwin_stackdump): Use stackdump() rather than stack().
1505 (try_to_debug): Remove all synchronization logic. Just keep looping in
1506 exception handler until debugger notices us. Return 1 if successfully
1507 started debugger.
1508 (handle_exceptions): Just return if we know that we're debugging.
1509 Reorganize to avoid creating a stackdump file if we are starting a
1510 debugger. Return from exception handler if debugger started
1511 successfully.
1512 (sig_handle): Create a stackdump only if debugger wasn't started.
1513 * winsup.h (try_to_debug): Add an argument.
1514
2b5803d4
CF
1515Sun Apr 29 21:41:25 2001 Christopher Faylor <cgf@cygnus.com>
1516
1517 * path.cc (symlink_info::check): Remove extra arguments, move
1518 functionality back to path_conv::check. Clear symlink bit from pflags
1519 argument before detecting if this is a symlink.
1520 (path_conv::check): Convert posix path here instead of
1521 symlink_info::check. Only grab volflags when using ntsec.
1522 (symlink_info::check_case): Just replace appropriate part of input
1523 path.
1524
b98ebf54
CF
1525Sat Apr 28 19:36:13 2001 Christopher Faylor <cgf@cygnus.com>
1526
1527 Throughout, change 'tty_attached' to 'real_tty_attached', for clarity.
1528 Throughout, change 'OutputStopped' to 'output_stopped', for
1529 consistency.
1530 * dtable.cc (stdio_init): Set controlling tty if not set by stdio
1531 opens.
1532 * exceptions.cc (ctrl_c_handler): Avoid special pgid checking if no tty
1533 is associated with the process.
1534 (Suggested by Tim Baker <dbaker@direct.ca>)
1535 * external.cc (fillout_pinfo): Return actual tty number for ctty.
1536 * fhandler_console.cc (get_tty_stuff): Set ctty when shared memory is
1537 allocated. Accept flags input from open().
1538 (set_console_ctty): New function.
1539 (fhandler_console::open): Pass flags to get_tty_stuff and rely on this
1540 function to set the ctty, if appropriate.
1541 * fhandler_termios.cc (fhandler_termios::set_ctty): Move to tty_min
1542 class.
1543 * fhandler_tty.cc (fhandler_tty_slave::open): Use tc field to access
1544 set_ctty().
1545 * tty.h (TTY_CONSOLE): Move to include/sys/cygwin.h.
1546 (tty_min): Add set_ctty class here.
1547 * include/sys/cygwin.h (TTY_CONSOLE): New home here.
1548
1549 * path.cc (symlink_info): Make contents an actual buffer. Pass more
1550 flags to case_check.
1551 (path_conv::check): Reorganize to do parsing based on posix path rather
1552 than native path.
1553 (symlink_info::check): Expect posix path as input. Translate to native
1554 path here. Accept path_conv flags. Stop parsing if not a symlink
1555 regardless of whether previous path was a symlink.
1556
cba63823
CF
15572001-04-27 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1558
1559 * thread.cc (thread_init_wrapper): Use _REENT_INIT to initialize the
1560 reent structure of newlib.
1561
1562Fri Apr 27 14:02:24 2001 Christopher Faylor <cgf@cygnus.com>
1563
1564 * sigproc.h (sig_send): Add exception parameter to sig_send.
1565 * sigproc.cc (sig_send): Ditto. Use it when setting frame info.
1566 * exceptions.cc (handle_exceptions): Use exception flag when calling
1567 sig_send.
1568
a069f560
ED
15692001-04-27 Egor Duda <deo@logos-m.ru>
1570
1571 * tty.cc (tty::make_pipes): Set to_slave pipe mode to nonblocking.
1572 * fhandler_tty.cc (fhandler_pty_master::accept_input): If pipe buffer
1573 is full, give slave a chance to read data.
1574
22ae5a5b
CV
15752001-04-26 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1576
d61b1993 1577 * security.cc (alloc_sd): Add unrelated ACCESS_ALLOWED_ACE behind
22ae5a5b
CV
1578 the `everyone' ACE.
1579
968d91b2
CF
1580Wed Apr 25 15:07:37 2001 Christopher Faylor <cgf@cygnus.com>
1581
fb1a9f35
CF
1582 * sigproc.h [sigthread]: Add exception field.
1583 [sigframe::~sigframe]: Clear exception field.
1584 [sigframe::set]: Set exception field from caller.
968d91b2
CF
1585 * sigproc.cc (sig_send): Set exception field when frame pointer is
1586 passed in.
1587 * exceptions.cc (interrupt_on_return): Always treat exception as
1588 interruptible.
1589
86699e15
ED
15902001-04-25 Egor Duda <deo@logos-m.ru>
1591
1592 * cygwin.din: Export asctime_r, ctime_r, gmtime_r, localtime_r
1593 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 39
1594
edc4bfd9
CF
1595Wed Apr 25 10:57:36 2001 Christopher Faylor <cgf@cygnus.com>
1596
1597 * include/cygwin/version.h: Bump minor version number.
1598 * childinfo.h: Bump child structure magic number.
1599
feae8d0e
CV
16002001-04-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1601
1602 * uinfo.cc (internal_getlogin): Return pointer to struct passwd.
1603 (uinfo_init): Accommodate the above change.
1604 * syscalls.cc (seteuid): Ditto.
1605
d551169a
CV
1606Tue Apr 25 11:08:00 2001 Corinna Vinschen <corinna@vinschen.de>
1607
1608 * autoload.cc: Add LoadDLLfunc statements for SetTokenInformation@16.
1609 * cygheap.cc: Include security.h.
1610 * grp.cc (internal_getgrent): New function.
1611 (getgroups): Rearranged using `internal_getgrent' and the new
1612 `cygsid' class.
1613 * passwd.cc (internal_getpwent): New function.
1614 * sec_acl.cc: Use new `cygsid' class throughout.
1615 (acl_access): Use `internal_getgrent' instead of `getgrent'.
1616 * sec_helper.cc: Use new `cygsid' class throughout.
1617 (get_id_from_sid): Use `internal_getgrent' instead of `getgrent'.
1618 Use `internal_getpwent' instead of `getpwent'.
1619 * security.cc: Use new `cygsid' class throughout.
1620 * security.h: Move `MAX_SID_LEN' from winsup.h to here.
1621 Add extern declarations for `internal_getgrent' and `internal_getpwent'.
1622 (class cygsid): New class.
1623 * shared.cc (sec_user): Use new `cygsid' class.
1624 * syscalls.cc (seteuid): Try to set owner to user and primary group to
1625 current group in impersonation token before performing impersonation.
1626 (setegid): Try to set primary group in process token to the new group
1627 if ntsec is on.
1628 * uinfo.cc (internal_getlogin): Use new `cygsid' class.
1629 Try to set owner to user and primary group to current group in process
1630 token if the process has been started from a non cygwin process.
1631 (uinfo_init): Set primary group only if the process has been started
1632 from a non cygwin process.
1633 * winsup.h: Move define for `MAX_SID_LEN' to security.h.
1634
3a6e9668
CV
1635Mon Apr 16 23:20:00 2001 Andy Younger <andylyounger@hotmail.com>
1636
1637 * fhandler_dsp.cc: Improved handling of 8 bit playback modes.
1638 Put in mock support for SNDCTL_DSP_SETFRAGMENT.
1639
b7cf6a2f
CV
1640Tue Apr 24 23:51:00 2001 Corinna Vinschen <corinna@vinschen.de>
1641
1642 * passwd.cc (getpwnam_r): Add pw_passwd handling as well.
1643 (getpwuid_r): Ditto.
1644
3c73ae1c
CV
1645Tue Apr 24 23:43:00 2001 Corinna Vinschen <corinna@vinschen.de>
1646
1647 * passwd.cc (getpwnam_r): Use correct offsets into buffer.
1648 Copy pw_gecos field as well.
1649 (getpwuid_r): Ditto.
1650
8db71e01
ED
16512001-04-24 Egor Duda <deo@logos-m.ru>
1652
1653 * dlmalloc.c: New file. Port of Doug Lea's malloc
1654 * dlmalloc.h: Ditto.
1655 * Makefile.in: Add support for MALLOC_DEBUG
1656 * config.h.in: Ditto.
1657 * winsup.h: Ditto.
1658 * configure.in: Add --enable-malloc-debugging option.
1659 * configure: Regenerate.
1660 * debug.h: Include declarations for debugging malloc.
1661 * tty.cc (grantpt): Fix definition.
1662 (unlockpt): Ditto.
1663
f3ea62a8
CF
1664Mon Apr 23 22:00:29 2001 Christopher Faylor <cgf@cygnus.com>
1665
1666 Remove trailing underscore from fhandler_base and friends, throughout.
1667 * fhandler.h (fhandler_base::set_open_status): New method. Stores
1668 original open status.
1669 (fhandler_base::get_open_status): New method. Retrieves original open
1670 status.
1671 (fhandler_base::reset_to_open_binmode): New method.
1672 * fhandler.cc (fhandler_base::open): Save open status.
1673 (fhandler_base::init): Ditto.
1674 * fhandler_clipboard.cc (fhandler_clipboard::open): Ditto.
1675 * fhandler_console.cc (fhandler_console::open): Ditto.
1676 * fhandler_dsp.cc (fhandler_dsp::open): Ditto.
1677 * fhandler_dev_mem.cc (fhandler_dev_mem::open): Ditto.
1678 * fhandler_dev_random.cc (fhandler_dev_random::open): Ditto.
1679 * fhandler_serial.cc (fhandler_serial::open): Ditto.
1680 * fhandler_tty_slave.cc (fhandler_tty_slave::open): Ditto.
1681 * fhandler_tty_master.cc (fhandler_tty_master::open): Ditto.
1682 * fhandler_dev_zero.cc (fhandler_dev_zero::open): Ditto.
1683 * syscalls.cc (setmode): Rework so that 0 mode value causes reversion
1684 to open state.
1685
1686 * fhandler_tty_slave.cc (fhandler_tty_slave::read): Use correct
1687 multiplier when converting from deciseconds to milliseconds.
1688
9cf9c146
CF
1689Mon Apr 23 13:28:35 2001 Christopher Faylor <cgf@cygnus.com>
1690
1691 * fhandler.h (fhandler_base::clear_r_binary): New method.
1692 (fhandler_base::clear_w_binary): New method.
1693 * syscalls.cc (setmode): Accept 0 as mode value. Resets text/binary
1694 behavior for fd to default.
1695
f940c5b1
CF
1696Mon Apr 23 12:46:07 2001 Christopher Faylor <cgf@cygnus.com>
1697
1698 * net.cc [errmap]: Add '0' condition.
1699 (find_winsock_errno): Don't translate no error to EPERM.
1700
c02e9189
CF
1701Sun Apr 22 20:48:24 2001 Christopher Faylor <cgf@cygnus.com>
1702
1703 * include/cygwin/version.h: Bump Cygwin version and API version.
1704
9672024b
RC
1705Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com>
1706
1707 * thread.cc (MTinterface::Init): Always initialise per process variables.
1708
1acf5c29
CF
1709Sun Apr 22 19:18:18 2001 Christopher Faylor <cgf@cygnus.com>
1710
1711 * features.h: Reinstate as wrapper for sys/features.h.
1712
b2652452
CV
1713Mon Apr 23 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
1714
1715 * security.cc (alloc_sd): Reformat comment.
1716 * shared.cc: Drop function declarations already in security.h.
1717
96dc5dd7
CF
1718Sun Apr 22 12:17:57 2001 Christopher Faylor <cgf@cygnus.com>
1719
1720 * shortcut.c (check_shortcut): Close input file handle before
1721 returning.
1722 * path.cc (check_sysfile): Ditto.
1723 (symlink_info::check): Rely on opened file handle being closed by
1724 symlink checking routines. Set ext_tacked_on when .lnk is detected.
1725
da77d416
CF
1726Sat Apr 21 19:26:05 2001 Christopher Faylor <cgf@cygnus.com>
1727
1728 * thread.cc (MTinterface::Init): Remove accidentally checked in code.
1729
9450ad0d
RC
1730Sun Apr 22 00:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
1731
1732 * passwd.cc (getpwuid): Check for thread cancellation.
1733 (getpwuid_r): Ditto.
1734 (getpwname): Ditto.
1735 (getpwnam_r): Ditto.
1736 * thread.h (pthread_mutex): New constructors for pshared operation.
1737 (MTinterface): Associative array for pshared mutex's.
1738 * thread.cc (MTinterface::Init): Initailize pshared mutex array.
1739 (pthread_cond::BroadCast): Implementation notes.
1740 (pthread_cond::TimedWait): Remove use of SignalObjectAndWait on non-NT systems.
1741 (pthread_mutex::pthread_mutex(unsigned short)): New function.
1742 (pthread_mutex::pthread_mutex (pthread_mutex_t *, pthread_mutexattr *)):New function.
1743 (pthread_mutex::pthread_mutex(pthread_mutexattr *)): Fail on pshared mutex's.
1744 (__pthread_mutex_getpshared): New function.
1745 (__pthread_join): Check for thread cancellation.
1746 (__pthread_cond_timedwait): Support pshared mutex's.
1747 (__pthread_cond_wait): Ditto.
1748 (__pthread_condattr_setpshared): Error on PROCESS_SHARED requests.
1749 (__pthread_mutex_init): Support pshared mutex's.
1750 (__pthread_mutex_getprioceiling): Ditto.
1751 (__pthread_mutex_lock): Ditto.
1752 (__pthread_mutex_trylock): Ditto.
1753 (__pthread_mutex_unlock): Ditto.
1754 (__pthread_mutex_destroy): Ditto.
1755 (__pthread_mutex_setprioceiling): Ditto.
d61b1993 1756 (__pthread_mutexattr_setpshared): Support PTHREAD_PROCESS_PSHARED requests.
9450ad0d 1757
60326076
CF
1758Fri Apr 20 19:38:29 2001 Christopher Faylor <cgf@cygnus.com>
1759
1760 * cygwin.din: Add *scanf and *scan_r functions.
1761
3c8e92d9
CV
1762Fri Apr 20 22:25:00 2001 Corinna Vinschen <corinna@vinschen.de>
1763
1764 * security.cc (set_process_privileges): Swap out.
1765 * sec_helper.cc (set_process_privilege): Rename from
1766 `set_process_privileges'. Takes the privilege to enable or disable
1767 as parameter now.
1768 * security.h: Add prototype for `set_process_privileges'.
1769
b9815dc3 17702001-04-19 Egor Duda <deo@logos-m.ru>
d61b1993 1771
b9815dc3
CF
1772 * path.cc (path_conv::check): Always initialize member variables.
1773
cbd88687
CF
1774Fri Apr 20 12:27:49 2001 Christopher Faylor <cgf@cygnus.com>
1775
1776 * include/sys/file.h: More cleanup for X_OK.
1777
cdcfe4e8
CF
1778Fri Apr 20 11:48:45 2001 Christopher Faylor <cgf@cygnus.com>
1779
1780 * include/sys/file.h: Move X_OK protection earlier.
1781
1782 * dtable.cc (dtable::vfork_child_fixup): Avoid closing already closed
1783 handles.
1784
bfbc1aec
CV
1785Fri Apr 20 16:29:00 2001 Corinna Vinschen <corinna@vinschen.de>
1786
1787 * grp.cc (getgroups): Change so that SIDs get compared instead
1788 of strings to SIDs.
1789
c0d1968a
CV
1790Fri Apr 20 14:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
1791
1792 * Makefile.in: Add object files `sec_helper.cc' and `sec_acl.cc'.
1793 * security.cc: Swap out several functions.
1794 * sec_acl.cc: New file. Move Sun compatibel ACL functions from
1795 `security.cc' to here.
1796 * sec_helper.cc: New file. Move security helper functions from
1797 `security.cc' to here.
1798 * security.h: Changed to accomodate the above changes.
1799
1800Fri Apr 20 14:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
1801
1802 * grp.cc: Replace `group_in_memory_p' by `group_state'.
1803 Eliminate group_sem throughout.
1804 (enum grp_state): New enumeration type.
1805 (read_etc_group): Make race safe.
1806 * security.cc: Eliminate group_sem throughout.
1807
b78d6f6e
CV
1808Thu Apr 19 9:40:00 2001 Corinna Vinschen <corinna@vinschen.de>
1809
1810 * mmap.cc (mmap): Drop usage of the same memory area if the same
1811 region of the same file is mapped twice.
1812
0381fec6
CF
1813Wed Apr 18 16:53:54 2001 Christopher Faylor <cgf@cygnus.com>
1814
1815 Throughout, change fdtab references to cygheap->fdtab.
1816 * child_info.h (cygheap_exec_info): Eliminate special fdtab stuff.
1817 * spawn.cc (spawn_guts): Ditto.
1818 * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate.
1819 * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap.
1820 (_cmalloc_entry): Include fdtab here.
1821 * dtable.h (dtable): Declare/define new methods.
1822 * dtable.cc (dtable::vfork_child_fixup): New method.
1823 (dtable::fixup_after_exec): Remove unneeded extra arguments.
1824 * dcrt0.cc (dll_crt0_1): Ditto.
1825
1826 * environ.cc (getwinenv): Use case sensitive comparison.
1827 (winenv): Make a copy of environment cache to avoid realloc problems
1828 when duplicate environment variables exist in the environment. (From
1829 Egor Duda)
1830
1831 * net.cc (cygwin_socket): Revert Apr 14 change.
1832
1833 * include/sys/file.h: Protect against previous X_OK definition.
1834
1835Tue Apr 17 12:18:28 2001 Christopher Faylor <cgf@cygnus.com>
1836
1837 * passwd.cc: Eliminate passwd_sem throughout.
1838 * security.cc: Ditto.
1839
1840Tue Apr 17 12:18:28 2001 Robert Collins <rbtcollins@hotmail.com>
1841
1842 * cygwin.din: Export New functions.
1843 * passwd.cc (read_etc_passwd): Make race safe.
1844 (getpwuid_r): New function.
1845 (getpwnam_r): New function.
1846
77c45b12
CV
18472001-04-18 Egor Duda <deo@logos-m.ru>
1848
1849 * grp.cc (getgroups): Avoid crash if passwd field if /etc/group is
1850 empty.
1851
4199e1e6
CF
1852Tue Apr 17 19:05:44 2001 Christopher Faylor <cgf@cygnus.com>
1853
1854 * path.h (path_conv::add_ext_from_sym): Declare.
1855 * path.cc (path_conv::add_ext_from_sym): Convert to pure inline method.
1856
e6629a8a
CV
1857Tue Apr 17 18:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
1858
1859 * path.cc (windows_device_names): Add missing NULL element.
1860
adfd477d
CF
1861Tue Apr 17 12:14:54 2001 Christopher Faylor <cgf@cygnus.com>
1862
1863 * path.cc (windows_device_names): Move dsp to proper location.
1864
8aefe7c0
CV
1865Tue Apr 17 13:44:00 2001 Corinna Vinschen <corinna@vinschen.de>
1866
1867 * path.cc (path_conv::check): Set case_clash even if pcheck_case
1868 is set to PCHECK_ADJUST when a case clash is given for the last
1869 component in path.
1870 (symlink_info::case_check): Ditto.
1871 * syscalls.cc (_rename): Avoid overwriting an already existing file
1872 if a case clash is given even if pcheck_case is set to PCHECK_ADJUST.
1873
77eb506d
CV
1874Tue Apr 17 2:07:07 2001 Christopher Faylor <cgf@cygnus.com>
1875
1876 * config.h.in: Turn off VFORK again.
1877
431ba7dd
CF
1878Mon Apr 16 23:45:24 2001 Christopher Faylor <cgf@cygnus.com>
1879
1880 * path.h (cwdstuff): Move class.
1881 * cygheap.h (cwdstuff): To here.
1882 (init_cygheap): Add cwd field.
1883 * child_info.h (cygheap_exec_info): Eliminate cwd stuff.
1884 (child_info_spawn): Ditto.
1885 * dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call. Convert
1886 cygcwd reference to cygheap->cwd.
1887 * path.cc: Ditto, throughout.
1888 (cwdstuff::copy): Eliminate.
1889 (cwdstuff::fixup_after_exec): Ditto.
1890 * spawn.cc (spawn_guts): Eliminate call to cygcwd.copy.
1891
1892 * fhandler.h (FH_OSS_DSP): Move into "fast" device category.
1893
7ade56ca
CV
1894Mon Apr 16 19:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
1895
1896 * mmap.cc: Move fh_paging_file from some functions to be
1897 a global static variable.
1898 (class mmap_record): Add `devtype_' member to remember
1899 the device type of the file. Add declaration for methods
1900 `get_device', `alloc_fh' and `free_fh'.
1901 (mmap_record::mmap_record): Initialize `devtype_' correctly.
1902 (mmap_record::alloc_fh): New method.
1903 (mmap_record::free_fh): Ditto.
1904 (munmap): Use new mmap_record::alloc_fh and mmap_record::free_fh
1905 methods to create a correct fhandler.
1906 (msync): Ditto.
1907 (fixup_mmaps_after_fork): Ditto.
1908
c4548fb4
CV
1909Mon Apr 16 16:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
1910
1911 * grp.cc (getgroups): If `allow_ntsec' is set, use the process token
1912 information to evaluate the groups list.
1913
3b3b19d2
CF
1914Mon Apr 16 00:08:02 2001 Christopher Faylor <cgf@cygnus.com>
1915
1916 * features.h: Remove this file as it is now being supplied by newlib.
1917
b0a50cf3
CF
1918Sun Apr 15 23:23:29 2001 Christopher Faylor <cgf@cygnus.com>
1919
1920 * autoload.cc: Add winmm functions needed by fhandler_dsp.cc.
1921
1922Sun Apr 15 22:53:52 2001 Andy Younger <andylyounger@hotmail.com>
1923
1924 * fhandler_dsp.cc: New file. Implements OSS like /dev/dsp.
1925 * include/sys/soundcard.h: New file. User land includes for OSS
1926 /dev/dsp.
1927 * fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP
1928 definition.
1929 * dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp
1930 device.
1931 * path.cc (windows_device_names): Add /dev/dsp into list of device
1932 names.
1933 * Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
1934
4535e6a9
CF
1935Sun Apr 15 16:36:27 2001 Christopher Faylor <cgf@cygnus.com>
1936
1937 * uname.c (uname): Default n in in86 to 6 if Windows returns > 6.
1938
1ff87985
CV
1939Sun Apr 15 15:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1940
1941 * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
1942 (add_ext_from_sym_): New inline function.
1943
34bbe838
CF
1944Sat Apr 14 19:23:52 2001 Christopher Faylor <cgf@cygnus.com>
1945
1946 * config.h.in: Turn on VFORK by default.
1947
266be1d8
CF
1948Sat Apr 14 18:04:35 2001 Christopher Faylor <cgf@cygnus.com>
1949
1950 * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX
1951 domain sockets will not stay around.
1952
1953Sat Apr 14 18:01:43 2001 Pierre A. Humblet <Pierre.Humblet@ieee.org>
1954
1955 * select.cc (socket_cleanup): Set SO_LINGER to small value so closed
1956 dummy sockets do not stay around. Use correct value for second argument
1957 to shutdown.
1958
e6b98fc8
RC
1959Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>
1960
1961 * thread.h (MTinterface): Add threadcount.
1962 * thread.cc (MTinterface::Init): Set threadcount to 1.
1963 (__pthread_create): Increment threadcount.
1964 (__pthread_exit): Decrement threadcount and call exit() from the last thread.
1965
1114d472 1966Fri Apr 13 11:34:24 2001 Robert Collins <rbtcollins@hotmail.com>
39b6859a
CF
1967
1968 * fork.cc (fork_child): Call the __pthread_atforkchild function.
1969 (fork_parent): Call the __pthread_atforkparent function.
1970 * cygwin.din: Export pthread_atfork.
1971 * thread.h (callback): New class.
1972 (MTinterface): Use it.
1973 * thread.cc (__pthread_atforkprepare): New function.
1974 (__pthread_atforkparent): New function.
1975 (__pthread_atforkchild): New function.
1976 (__pthread_atfork): New function.
1977 * pthread.cc (pthread_atfork): New function.
1978
e61cead3
CV
1979Fri Apr 13 9:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
1980
1981 * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
1982 (path_conv::check): Use add_ext_from_sym throughout.
1983
1984Thu Apr 12 23:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
70c370d6
CV
1985
1986 * dir.cc (mkdir): Check for case clash.
1987 * environ.cc: Add extern declaration for `pcheck_case'.
1988 (check_case_init): New function.
1989 (struct parse_thing): Add "check_case" option.
1990 * errno.cc (_sys_nerrlist): Add text for ECASECLASH.
1991 (strerror): Add case branch for ECASECLASH.
1992 * fhandler.cc (fhandler_disk_file::open): Check for case clash.
1993 * path.cc: Add global variable `pcheck_case'.
1994 (struct symlink_info): Add member `case_clash' and method `case_check'.
1995 (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'.
1996 (pathnmatch): New funtion.
1997 (pathmatch): Ditto.
1998 (path_conv::check): Add handling for case checking.
1999 (symlink): Check for case clash.
2000 (symlink_info::check): Add parameter for case checking.
2001 Handle case checking.
2002 (symlink_info::case_check): New method.
2003 (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT.
2004 * path.h: Add extern declarations for `pathmatch' and
2005 `pathnmatch'.
2006 (enum case_checking): New enumeration type describing
2007 the case checking behaviour of path conversion routines.
2008 (class path_conv): Add member `case_clash'.
2009 * syscalls.cc (_link): Check for case clash.
2010
82d4a5d4
CF
2011Thu Apr 12 12:49:53 2001 Christopher Faylor <cgf@cygnus.com>
2012
2013 * syscalls.cc (mkfifo): New function stub.
2014
aa67fd12
CF
20152001-04-12 Robert Collins <rbtcollins@hotmail.com>
2016
2017 * configure.in: Remove PTH_ALLOW.
2018 * cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add
2019 new pthread exports.
2020 * pthread.cc: New wrapper functions for the above new exports.
2021 * sched.cc (valid_sched_parameters): New function.
2022 (sched_setparam): Use it.
2023 (sched_set_thread_priority): New function. Used by pthread_sched*.
2024 * thread.cc (pthread_key_destructor::InsertAfter): New function.
2025 (pthread_key_destructor::UnlinkNext): New function.
2026 (pthread_key_destructor::Next): New function.
2027 (pthread_key_destructor_list::Insert): New function.
2028 (pthread_key_destructor_list::Remove): New function.
2029 (pthread_key_destructor_list::Pop): New function.
2030 (pthread_key_destructor::pthread_key_destructor): New function.
2031 (pthread_key_destructor_list::IterateNull): New function.
2032 (MTinterface::Init): Initialise new member.
2033 (pthread::pthread): Initialise new members.
2034 (pthread::create): Copy new attributes. Set the new thread priority.
2035 (pthread_attr::pthread_attr): Initialise new members.
2036 (pthread_key::pthread_key): Setup destructor function.
2037 (pthread_key::~pthread_key): Remove destructor function.
2038 (pthread_mutexattr::pthread_mutexattr): New function.
2039 (pthread_mutexattr::~pthread_mutexattr): New function.
2040 (__pthread_once): New function.
2041 (__pthread_cleanup): New function.
2042 (__pthread_cancel): New function.
2043 (__pthread_setcancelstate): New function.
2044 (__pthread_setcanceltype): New function.
2045 (__pthread_testcancel): New function.
2046 (__pthread_attr_getinheritsched): New function.
2047 (__pthread_attr_getschedparam): New function.
2048 (__pthread_attr_getschedpolicy): New function.
2049 (__pthread_attr_getscope): New function.
2050 (__pthread_attr_setinheritsched): New function.
2051 (__pthread_attr_setschedparam): New function.
2052 (__pthread_attr_setschedpolicy): New function.
2053 (__pthread_attr_setscope): New function.
2054 (__pthread_exit): Call any key destructors on thread exit.
2055 (__pthread_join): Use the embedded attr values.
2056 (__pthread_detach): Use the embedded attr values.
2057 (__pthread_getconcurrency): New function.
2058 (__pthread_getschedparam): New function.
2059 (__pthread_key_create): Pass the destructor on object creation.
2060 (__pthread_key_delete): Correct incorrect prototype.
2061 (__pthread_setconcurrency): New function.
2062 (__pthread_setschedparam): New function.
2063 (__pthread_cond_timedwait): Support static mutex initialisers.
2064 (__pthread_cond_wait): Ditto.
2065 (__pthread_mutex_getprioceiling): New function.
2066 (__pthread_mutex_lock): Support static mutex initialisers.
2067 (__pthread_mutex_trylock): Ditto.
2068 (__pthread_mutex_unlock): Ditto.
2069 (__pthread_mutex_destroy): Ditto.
2070 (__pthread_mutex_setprioceiling): New function.
2071 (__pthread_mutexattr_getprotocol): New function.
2072 (__pthread_mutexattr_getpshared): New function.
2073 (__pthread_mutexattr_gettype): New function.
2074 (__pthread_mutexattr_init): New function.
2075 (__pthread_mutexattr_destroy): New function.
2076 (__pthread_mutexattr_setprotocol): New function.
2077 (__pthread_mutexattr_setprioceiling): New function.
2078 (__pthread_mutexattr_getprioceiling): New function.
2079 (__pthread_mutexattr_setpshared): New function.
2080 (__pthread_mutexattr_settype): New function. Remove stubs for non
2081 MT_SAFE compilation.
2082 * thread.h: Remove duplicate #defines. Add prototypes for new
2083 functions in thread.cc.
2084 (pthread_key_destructor): New class.
2085 (pthread_key_destructor_list): New class.
2086 (pthread_attr): Add new members.
2087 (pthread): Remove members that are duplicated in the pthread_attr
2088 class.
2089 (pthread_mutex_attr): Add new members.
2090 (pthread_once): New class.
2091 * include/pthread.h: Add prototypes for new functions exported from
2092 cygwin1.dll. Remove typedefs.
2093 * include/sched.h: Add prototypes for new functions in sched.cc.
2094 * include/cygwin/types.h: Add typedefs from pthread.h
2095
fc672fb2
CF
2096Tue Apr 10 22:02:53 2001 Christopher Faylor <cgf@cygnus.com>
2097
2098 * path.cc (struct symlink_info): Add extn and ext_tacked_on fields.
2099 (path_conv::check): Only tack on extension if a known one didn't
2100 already exist.
2101 (suffix_scan::has): Return pointer to known extension.
2102 (symlink_info::check): Record location of extension, if any.
2103
619f7fa0
ED
21042001-04-09 Egor Duda <deo@logos-m.ru>
2105
2106 * fhandler.h (class fhandler_socket): Add members and methods to
2107 support secure connections on AF_UNIX sockets.
2108 * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method.
2109 (fhandler_socket::get_connect_secret): Ditto.
2110 (fhandler_socket::create_secret_event): Ditto.
2111 (fhandler_socket::close_secret_event): Ditto.
2112 (fhandler_socket::check_peer_secret_event): Ditto.
2113 (fhandler_socket::fixup_after_fork): Duplicate secret event to child.
2114 (fhandler_socket::dup): Copy address family.
2115 (fhandler_socket::close): Close secret event.
2116 * net.cc (get_inet_addr): Read secret cookie.
2117 (cygwin_connect): Check if peer knows secret cookie value.
2118 (cygwin_accept): Ditto. Copy address family to newly created socket.
2119 (cygwin_bind): Generate and write secret cookie.
2120 (wsock_init): Initialize random number generator.
2121
aa970c61
CF
2122Sun Apr 8 20:40:58 2001 Christopher Faylor <cgf@cygnus.com>
2123
2124 * Makefile.in: Put -lgcc last in list of libraries, since stdc++
2125 library needs it.
2126 * cygwin.din: Remove obsolete "__empty" export.
2127 * exceptions.cc (call_signal_handler_now): Force inclusion of function
2128 even when -finline-functions is specified.
2129 * sigproc.h: Remove obsolete call_signal_handler declaration.
2130
2131Sun Apr 8 20:36:55 2001 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>
e3eef4d0 2132
aa970c61
CF
2133 * fhandler_console.cc (cp_get_internal): New function.
2134 (cp_convert): New function.
2135 (con_to_str): New function.
2136 (str_to_con): New function.
2137 (fhandler_console::read): Replace OemToCharBuff with con_to_str.
2138 (fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
2139
9ddfe5a0
CV
2140Thu Apr 5 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
2141
2142 * syscalls.cc (stat_worker): Fix conditional which still allowed
2143 successful stat'ing of non-existant files.
2144
0403bb74
CF
2145Wed Apr 4 10:37:44 2001 Christopher Faylor <cgf@cygnus.com>
2146
2147 * child_info.h: Bump magic number for fork/exec/spawn.
2148
c196a1a2
CV
2149Tue Apr 3 20:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
2150
2151 * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO.
2152
c90e420d
CF
2153Mon Apr 2 22:48:58 2001 Christopher Faylor <cgf@cygnus.com>
2154
2155 * cygrun.c (main): Fix compiler warning.
2156 * gmon.c (_mcleanup): Ditto.
2157 * profil.c (profile_off): Ditto.
2158
2159 * net.cc (find_winsock_errno): New function.
2160 (__set_winsock_errno): Use find_winsock_errno.
2161 (cygwin_setsockopt): Detect SO_ERROR for debugging.
2162 (cygwin_getsockopt): Ditto. Translate error when getsockopt returns
2163 SO_ERROR.
2164 * winsup.h: regparmize __set_winsock_errno.
2165 * include/sys/strace.h: Document that strace functions can't use
2166 regparm.
2167
0f0a7dc9
CV
21682001-04-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2169
2170 * fhandler.cc (fhandler_disk_file::open): Avoid checking a magic
2171 number of a directory.
2172
f97adf98
CF
2173Mon Apr 2 00:24:08 2001 Christopher Faylor <cgf@cygnus.com>
2174
2175 * shared_info.h (mount_info): Remove mnt_ elements.
2176 * thread.h (struct _winsup_t): Add mnt_ elements.
2177 * path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
2178
1ba3935d
CF
2179Sun Apr 1 20:10:34 2001 Christopher Faylor <cgf@cygnus.com>
2180
2181 * exceptions.cc (sigframe::call_signal_handler): Return value of
2182 call_signal_handler_now.
2183 * sigproc.h (sigframe): Use constructor.
2184 * syscalls.cc (_read): Correct errno test prior to calling signal
2185 handler.
2186
2a1743c7
CF
2187Sun Apr 1 00:38:06 2001 Christopher Faylor <cgf@cygnus.com>
2188
0ef785e4 2189 * exceptions.cc (sigframe::call_signal_handler): Move outside of "C"
2a1743c7
CF
2190 block or some compilers will complain.
2191
11f3a79b
CF
2192Sun Apr 1 00:24:14 2001 Christopher Faylor <cgf@cygnus.com>
2193
2194 * exceptions.cc (call_signal_handler_now): Rename from
2195 call_signal_handler to avoid C++ confusion.
2196
5817ee2d
CF
2197Sun Apr 1 00:08:15 2001 Christopher Faylor <cgf@cygnus.com>
2198
2199 * path.cc (fillout_mntent): Always remove drive root directories from
2200 future consideration by "/cygdrive" reporting.
2201 (cygdrive_getmnt): Avoid reporting removable drives or drives with no
2202 media mounted.
2203
f2aeff27
CF
2204Sat Mar 31 21:56:19 2001 Christopher Faylor <cgf@cygnus.com>
2205
2206 * thread.h (struct _winsup_t): Remove obsolete elements. Add
2207 available_drives element.
2208 * path.cc (mount_info::getmntent): Report "/cygdrive" drives when
2209 mounted drives are exhausted.
2210 (fillout_mntent): New function.
2211 (mount_item::getmntent): Use fillout_mntent.
2212 (cygdrives_mntent): New function. Returns next available "/cygdrive".
2213 (setmntent): Initialize available "/cygdrives".
2214 * syscalls.cc: Remove some if 0'ed code.
2215 * times.cc (timezone): Use more descriptive variable name.
2216
f6111483
CF
2217Sat Mar 31 18:59:52 2001 Christopher Faylor <cgf@cygnus.com>
2218
2219 * sigproc.h (class sigframe): Implement 'unregister()' method.
2220 (sigframe::~sigframe): Use unregister method.
2221 (sigframe::call_signal_handler): Declare new method.
2222 * exceptions.cc (sigframe::call_signal_handler): New method.
2223 Unregisters current sigframe before calling signal handler.
2224 (setup_handler): Clear waiting threads prior to arming signal_arrived.
2225 * syscalls.cc (_read): Change goto to loop. Recalculate sigframe
2226 inside of loop so that constructor is called when appropriate.
2227 * wait.cc (wait4): Ditto.
2228
2229 * signal.cc: Change "sig" to "signal" in debugging messages throughout.
2230 * sigproc.cc: Ditto.
2231
ab57d146
CF
2232Sat Mar 31 17:12:08 2001 Christopher Faylor <cgf@cygnus.com>
2233
2234 * fhandler_serial.cc (fhandler_serial::raw_write): Close protected
2235 handles with ForceCloseHandle or suffer spurious warnings.
2236
0cec3226
CF
2237Sat Mar 31 16:23:32 2001 Christopher Faylor <cgf@cygnus.com>
2238
2239 * fhandler.cc (fhandler_base::read): Remove special handling of CTRL-Z.
2240
70afbaae
CV
2241Sat Mar 31 11:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
2242
2243 * fhandler.h (class fhandler_console): Add members `insert_mode'.
2244 * fhandler_console.cc (fhandler_console::dup): Duplicate `insert_mode'.
2245 (fhandler_console::fhandler_console): Initialize `insert_mode'.
c796f4f1 2246 (fhandler_console::char_command): Add terminal capabilities
70afbaae
CV
2247 "enter insert mode" = \E[4h and "exit insert mode" = \E[4l.
2248 Care for insert mode on terminal capability "repeat char" = \E[x;yb.
2249 (fhandler_console::write_normal): Care for insert mode before writing
2250 to the console.
2251 (array keytable): Add keymapping for modified cursor and control
2252 block keys (xterm like).
2253
f42da31a
CV
2254Fri Mar 30 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
2255
2256 * fhandler.h (class fhandler_console): Add members `savebufsiz' and
2257 `savebuf' to allow save/restore of screen.
70afbaae
CV
2258 * fhandler_console.cc (fhandler_console::dup): Duplicate `savebufsiz'
2259 and `savebuf'.
f42da31a
CV
2260 (fhandler_console::fhandler_console): Initialize `savebufsiz' and
2261 `savebuf'.
2262 (fhandler_console::char_command): Add terminal capabilities
2263 "save screen content" = \E[?47h and "restore screen content" = \E[?47l.
2264
b5eb3d0f
CF
2265Wed Mar 28 19:28:50 2001 Christopher Faylor <cgf@cygnus.com>
2266
2267 * path.cc (chdir): Eat trailing whitespace on input path.
2268
1ac6d1a1
CF
2269Tue Mar 27 22:38:42 2001 Christopher Faylor <cgf@cygnus.com>
2270
2271 * lib/_cygwin_S_IEXEC.c: Remove "const" from globals or they never seem
2272 to be defined. Wrap definitions in extern "C". Include winsup.h to
2273 assure proper definitions.
2274
2275 * dcrt0.cc (dll_crt0_1): Call stdio_init after premain run so that
2276 binmode.o, etc., will control default stdio settings.
2277 * dtable.cc (dtable::init_std_file_from_handle): Allow __fmode to force
2278 binmode/textmode settings. Default pipes to binmode.
2279
37a2d97a
CV
2280Tue Mar 27 11:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
2281
2282 * mmap.cc (mmap): Fix conditional for previous patch.
2283
1636a5a1
CV
2284Mon Mar 26 18:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
2285
2286 * mmap.cc (mmap): Outflank copy-on-write problem on 9x by
2287 setting access mode to FILE_MAP_READ when read access is requested.
2288
aa73152e
CF
2289Sun Mar 25 20:12:21 2001 Christopher Faylor <cgf@cygnus.com>
2290
2291 * dlfcn.cc (check_access): Eliminate.
2292 (check_path_access): Use passed in path_conv buf.
2293 (get_full_path_of_dll): Use passed in name buf to avoid a static. Rip
2294 out most of the path checking since LoadLibrary will do all of this
2295 automatically.
2296 (dlopen): Set errno when appropriate (may not be compliant?).
2297 * environ.cc (posify): Don't pass in "native" path if it seems to
2298 actually be posix.
2299
db0421f6
CF
2300Thursday Mar 22 2001 Robert Collins <rbtcollins@hotmail.com>
2301
2302 * fhandler.h (fhandler_dev_clipboard): Extend to support writing.
2303 * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
2304 Initialize new fields. Open clipboard here.
2305 (fhandler_dev_clipboard::dup): New method.
2306 (fhandler_dev_clipboard::open): Accomodate new fields. Register
2307 clipboard here, if appropriate.
2308 (set_clipboard): New function. Moves buffer to clipboard.
2309 (fhandler_dev_clipboard::write): Truly implement clipboard writing.
2310 (fhandler_dev_clipboard::read): Reimplement to allow successive reads.
2311 (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard.
0ed560cb
CF
2312 (fhandler_dev_clipboard::close): Clear out new fields. Support
2313 sequential reads and sequential writes. Support for binary data via a
2314 native clipboard format.
db0421f6 2315
0b30bad4 23162001-03-22 Egor Duda <deo@logos-m.ru>
0cec3226 2317
0b30bad4
CF
2318 * fhandler_console.cc (fhandler_console::set_default_attr): Update
2319 console color attributes on tty reset.
2320
c4458148
CF
2321Wed Mar 21 22:12:36 2001 Christopher Faylor <cgf@cygnus.com>
2322
2323 * autoload.cc (kernel32_init): New function for kernel32 autoload
2324 initialization.
2325 (SignalObjectAndWait): Add conditional load of this function when it is
2326 available.
2327
9a08b2c0
CF
23282001-03-21 Robert Collins <rbtcollins@hotmail.com>
2329
2330 * sched.cc: New file. Implement sched*.
2331 * include/sched.h: New file. User land includes for sched*.
2332 * Makefile.in: Add sched.o
2333 * cygwin.din: Add exports for sched*.
2334
a1299ba5
CF
2335Tue Mar 20 14:48:46 2001 Christopher Faylor <cgf@cygnus.com>
2336
2337 * dtable.cc: Guard against new winsock.h/winsock2.h warnings when
2338 mixing winsock*.h and sys/types.h.
2339 * fhandler_socket.cc: Ditto.
2340 * net.cc: Ditto.
2341 * select.cc: Ditto.
2342 * exceptions.cc: Remove unneeded define.
2343
b8c8fa17
CF
2344Mon Mar 19 17:43:29 2001 Christopher Faylor <cgf@cygnus.com>
2345
2346 * exceptions.cc (interruptible): Update debugging output.
2347 (setup_handler): Ensure that wait_sig loop wakes up when we punt on
2348 sending a signal.
2349 * poll.cc (poll): Add signal guard here.
2350
78ace8a7
ED
23512001-03-19 Egor Duda <deo@logos-m.ru>
2352
2353 * tty.h (tty::create_inuse): Add new parameter to allow non-
2354 inheritable 'inuse' events.
2355 * tty.cc (tty::create_inuse): Use new parameter.
2356 * fhandler_tty.cc (fhandler_tty_master::init): Ditto.
2357 * fhandler_tty.cc (fhandler_pty_master::open): Ditto.
2358 * fhandler_tty.cc (fhandler_tty_master::init): Create master_alive
2359 event.
2360 * tty.cc (tty_list::terminate): Close master_alive event.
2361 * fhandler_tty.cc (fhandler_tty_common::close): Send EOF to slaves
2362 when master side is closed.
2363
98750a84
CV
2364Mon Mar 19 14:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
2365
2366 * mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
2367 file descriptor is -1.
2368
30f326bf
CV
2369Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
2370
2371 * syscalls.cc (check_posix_perm): New static function.
2372 (fpathconf): Add _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
2373 support.
2374 (pathconf): Ditto.
2375 * include/cygwin/version.h: Bump API minor number to 37.
2376
5e8e21d9
ED
23772001-03-18 Egor Duda <deo@logos-m.ru>
2378
2379 * fhandler.h (fhandler_tty_slave): Declare new methods.
2380 * select.cc (fhandler_tty_slave::select_read): New method.
2381 * select.cc (fhandler_tty_slave::ready_for_read): Ditto.
2382 * select.cc (verify_tty_slave): New function.
2383 * fhandler_termios.cc (fhandler_termios::line_edit): Empty input
2384 buffer on signal.
2385 * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data
2386 after reading from pipe. Reset event if input pipe is empty.
2387 * tty.h (class tty): Allow creating events with manual reset.
2388 * tty.cc (tty::get_event): Use manual_reset flag.
2389 * tty.cc (tty::common_init): Create input_available_event with
2390 manual reset.
2391
00a74961
CF
2392Sat Mar 17 21:48:03 2001 Christopher Faylor <cgf@cygnus.com>
2393
2394 * external.cc (fillout_pinfo): Match windows pid, as well as cygwin pid
2395 when passed in pid. Don't prematurely break when searching for a pid.
2396
2397 * thread.h (_winsup_t): Eliminate unneeded field.
2398
8eb72e63
CV
2399Sat Mar 17 20:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
2400
2401 * net.cc (get_95_ifconf): Use strcasematch instead of strcasecmp.
2402 * syscalls.cc (_unlink): Ditto.
2403 (_rename): Ditto.
2404
57499703
CF
2405Sat Mar 17 12:43:15 2001 Christopher Faylor <cgf@cygnus.com>
2406
2407 * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
2408 input is "foo".
2409
298fad46
CV
2410Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
2411
2412 * net.cc (cygwin_socket): Set protocol to 0 when address family is
2413 AF_UNIX to avoid WSAEPROTONOSUPPORT error.
2414
f52488f7
CV
2415Sat Mar 17 09:51:32 2001 Mathew Brozowski <brozow@tavve.com>
2416
2417 * net.cc (cygwin_socket): Pass protocol parameter to socket call.
2418
b63a3f55
CF
2419Sat Mar 17 02:05:38 2001 Christopher Faylor <cgf@cygnus.com>
2420
2421 * dir.cc (readdir): Use strcasematch for consistency.
2422 * path.cc (symlink_info): Eliminate known_suffix.
2423 (path_conv::check): Always copy ext_here to end of buffer, if found.
2424 (suffix_scan): Eliminate ext_here, add suffixes_start.
2425 (suffix_scan::has): Eliminate an argument. Reorganize. Always return
2426 pointer to end of input path.
2427 (suffix_scan::next): Take a second pass through the suffix list looking
2428 for .lnk.
2429 (symlink_info::check): Eliminate known_suffix usage.
2430
db15b3e3 2431Sat Mar 17 00:10:52 2001 Christopher Faylor <cgf@cygnus.com>
5bb22c6b 2432
db15b3e3 2433 * syscalls.cc (stat_dev): Give devices full read/write by default.
5bb22c6b 2434
c0c9de3c
CF
2435Saturday Mar 17 3:45 2001 Robert Collins <rbtcollins@hotmail.com>
2436
2437 * thread.cc (MTinterface::CreateCond): Check for null attr pointer.
2438
ddca580f
CF
2439Fri Mar 16 21:13:23 2001 Christopher Faylor <cgf@cygnus.com>
2440
2441 * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input
2442 when a signal is sent or we'll end up in an EOF/signal race.
2443
b65c6896
CF
2444Fri Mar 16 20:25:40 2001 Christopher Faylor <cgf@cygnus.com>
2445
2446 * path.cc: Translate scan states from defines to enums.
2447 (suffix_scan): Rename state to nextstate for clarity.
2448 (lnk_match): Change to allow multiple states to indicate that a .lnk
2449 has been matched.
2450 (suffix_scan::has): Eliminate a goto. Handle .lnk as a special case,
2451 since a .lnk may also need to be tacked on the end of a .lnk.
2452 (suffix_scan::next): Don't increment next state. Set it specifically.
2453 Recognize new .lnk states.
2454
92f4bf97 2455Saturday Mar 17 01:19 2001 Robert Collins rbtcollins@hotmail.com
0cec3226 2456
5ccbf4b6
CF
2457 * cygwin.din: Export the new functions.
2458 * pthread.cc (pthread_cond_*): Add wrapper functions that call
2459 __pthread_cond* functions.
2460 * thread.cc (__pthread_cond_*): Implement the pthread_cond* functions.
2461 * thread.h: Add new class entries and prototypes for __pthread_cond*
2462 functions.
2463 * include/pthread.h: user land header prototypes for pthread_cond*
2464 functions and related defines.
2465
e212576d
CV
2466Wed Mar 14 16:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
2467
2468 * environ.cc (parse_options): Use strtok_r instead of strtok.
2469 * security.cc (convert_string_sid_to_sid): Ditto.
2470 (aclfromtext): Ditto. Fix buffer usage.
2471
78d2c08c
CV
2472Wed Mar 14 10:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
2473
2474 * path.cc (lnk_suffixes): Remove.
2475 (class suffix_scan): Add `lnk_state' flag.
2476 (suffix_scan::lnk_match): Return state of `lnk_state' now.
2477 (suffix_scan::has): Changed behaviour if file has `.lnk' suffix.
2478 (suffix_scan::next): Set `lnk_state' where appropriate.
2479 (symlink_info::check): Fix a wrong `break'.
2480 * syscalls.cc (chown_worker): Change debug statement to reflect
2481 lchown fix.
2482 (lchown): Call chown_worker with `PC_SYM_NOFOLLOW' instead of
2483 `PC_SYM_IGNORE'.
2484
1d39c83a
CV
2485Tue Mar 13 13:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
2486
2487 * fhandler.cc (fhandler_disk_file::fstat): Add correct modes to
2488 symlinks when stat'ing on FAT or FAT32 file systems.
2489
e935fcf0
ED
24902001-03-12 Egor Duda <deo@logos-m.ru>
2491
2492 * fhandler.h (fhandler_termios::fixup_after_exec): New function.
344ce60c
ED
2493 * fhandler_termios.cc (fhandler_termios::fixup_after_fork): New
2494 function. Fixup output handle.
e935fcf0
ED
2495 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output
2496 handle is now fixed up in fhandler_termios::fixup_after_fork().
2497
79409dc0
ED
24982001-03-12 Egor Duda <deo@logos-m.ru>
2499
2500 * fhandler.h (fhandler_termios::fhandler_termios): Enable fixup
2501 after fork.
2502 * fhandler_console.cc (fhandler_console::fhandler_console): Fixup
2503 after fork is now enabled in the base class constructor.
2504
2b777e2e
CF
2505Mon Mar 12 11:19:41 2001 Christopher Faylor <cgf@cygnus.com>
2506
2507 * mkvers.sh: Include config.h so that DEBUGGING is correctly defined.
2508
941fa5ad
CF
2509Mon Mar 12 09:47:55 2001 Christopher Faylor <cgf@cygnus.com>
2510
2511 * spawn.cc (spawn_guts): Don't set EXIT_REPARENTING if parent process
2512 is not a cygwin process (suggested by Jason Gouger
2513 <cygwin@jason-gouger.com>).
2514
d0909d91
CF
2515Sun Mar 11 16:00:58 2001 Christopher Faylor <cgf@cygnus.com>
2516
2517 * child_info.h: Bump magic number for fork/exec/spawn.
2518
2116a175
CF
2519Sat Mar 10 20:54:47 2001 Christopher Faylor <cgf@cygnus.com>
2520
2521 * autoload.cc (noload): Use proper method for multiline strings or
2522 newer gcc's complain.
2523 * exceptions.cc (unused_sig_wrapper): Ditto.
2524 * fhandler.h (fhandler_base): Make get_io_handle and friends return
2525 self.
2526 * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accomodate
2527 DEBUGGING flag to avoid spurious warnings when inheritance is set.
2528
7cf3b655
CF
2529Sat Mar 10 16:52:12 2001 Christopher Faylor <cgf@cygnus.com>
2530
2531 * shortcut.c (PATH_ALL_EXEC): Add parentheses to avoid a compiler
2532 warning.
2533
2534 * exceptions.cc (setup_handler): Clarify debugging message.
2535 * sigproc.cc (proc_subproc): Remove PROC_CHILDSTOPPED test. It is
2536 handled by normal PROC_CLEARWAIT case.
2537 (wait_sig): Eliminate "dispatched" tracking. Remove __SIGCHILDSTOPPED
2538 test. Decrement counter again before jumping out of
2539 InterlockedDecrement loop so that subsequent InterlockedIncrement will
2540 keep the counter at the correctly decremented value and also detect
2541 when there are pending signals.
2542 * sigproc.h: Remove __SIGCHILDSTOPPED element.
2543 (procstuff): Remove PROC_CHILDSTOPPED element.
2544
e2f2a27e
CF
2545Sat Mar 10 15:22:44 2001 Christopher Faylor <cgf@cygnus.com>
2546
2547 * syscalls.cc (_rename): Set errno to ENOENT when an old path doesn't
2548 exist (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>). Also set EACCES
2549 when directory is not writable.
2550
6ebccdc1
CF
2551Wed Mar 7 15:49:47 2001 Christopher Faylor <cgf@cygnus.com>
2552
2553 * syscalls.cc (_read): Change definition to return ssize_t to be
2554 consistent with read.
2555 (_write): Change definition to return ssize_t to be consistent with
2556 write.
2557
efd76e41
CF
2558Wed Mar 7 01:08:21 2001 Christopher Faylor <cgf@cygnus.com>
2559
2560 * sigproc.h (sigthread): Declare new methods. Create new winapi_lock
2561 field.
2562 (sigframe:;set): Call get_winapi_lock after frame is set so that signal
2563 handler thread knows not to call SuspendThread.
2564 (sigframe::~sigframe): Release winapi_lock.
2565 * exceptions.cc (sigthread::get_winapi_lock): New method.
2566 (sigthread::release_winapi_lock): New method.
2567 (setup_handler): Use get_winapi_lock to ensure that signalled thread is
2568 not blocked in a Windows API.
2569
2570 * path.h (path_types): Avoid broken GCC warning.
2571
bf11a54f
CV
2572Tue Mar 6 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
2573
2574 * path.cc (suffix_scan::has): Change order of conditionals
2575 to allow checking for .lnk suffixes even if in_suffixes is empty.
2576
2577Tue Mar 6 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
7cdc9fee
CV
2578
2579 * autoload.c (cygwin_premain0): Add missing parameter.
2580 * binmode.c (cygwin_premain0): Ditto.
2581 * textmode.c (cygwin_premain0): Ditto.
2582
2583Tue Mar 6 12:04:00 2001 Jason Tiller <jtiller@sjm.com>
2584
2585 * auto_load.cc: Add "GetKeyboardLayout" entry in the list of
2586 Win32 User32.DLL exports to provide.
2587 * fhandler.h (class fhandler_console): Add meta_mask private
2588 member to remember which keystroke modifiers should generate
2589 META.
2590 * fhandler_console.cc (fhandler_console::read): Modify code that
2591 tests a keystroke for a META-escaped key to use the 'meta_mask'
2592 variable.
2593 (fhandler_console::fhandler_console): Add definition for
2594 variable "meta_mask" used to determine if a keystroke should be
2595 preceded by META in the client console stream. Set meta_mask
2596 based on whether or not user's keyboard language is English -
2597 non-English keyboards pass AltGr (right <ALT>) unmolested,
2598 whereas English keyboards now interpret left- and right-<ALT>
2599 as META.
2600
a887211b
CV
2601Mon Mar 5 20:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
2602
2603 * include/a.out.h: Add copyright hint.
2604 * include/fcntl.h: Ditto.
2605 * include/lastlog.h: Ditto.
2606 * include/memory.h: Ditto.
2607 * include/mntent.h: Ditto.
2608 * include/paths.h: Ditto.
2609 * include/poll.h: Ditto.
2610 * include/syslog.h: Ditto.
2611 * include/termio.h: Ditto.
2612 * include/tzfile.h: Ditto.
2613 * include/arpa/inet.h: Ditto.
2614 * include/asm/byteorder.h: Ditto.
2615 * include/asm/socket.h: Ditto.
2616 * include/asm/types.h: Ditto.
2617 * include/cygwin/if.h: Ditto.
2618 * include/cygwin/mtio.h: Ditto.
2619 * include/cygwin/rdevio.h: Ditto.
2620 * include/cygwin/socket.h: Ditto.
2621 * include/net/if.h: Ditto.
2622 * include/netinet/in.h: Ditto.
2623 * include/netinet/in_systm.h: Ditto.
2624 * include/netinet/ip.h: Ditto.
2625 * include/netinet/ip_icmp.h: Ditto.
2626 * include/netinet/tcp.h: Ditto.
2627 * include/sys/cdefs.h: Ditto.
2628 * include/sys/cygwin.h: Ditto.
2629 * include/sys/ioctl.h: Ditto.
2630 * include/sys/mman.h: Ditto.
2631 * include/sys/mount.h: Ditto.
2632 * include/sys/mtio.h: Ditto.
2633 * include/sys/procfs.h: Ditto.
2634 * include/sys/resource.h: Ditto.
2635 * include/sys/smallprint.h: Ditto.
2636 * include/sys/socket.h: Ditto.
2637 * include/sys/strace.h: Ditto.
2638 * include/sys/syslog.h: Ditto.
2639 * include/sys/sysmacros.h: Ditto.
2640 * include/sys/termio.h: Ditto.
2641 * include/sys/termios.h: Ditto.
2642 * include/sys/uio.h: Ditto.
2643 * include/sys/un.h: Ditto.
2644 * include/sys/utsname.h: Ditto.
2645 * include/sys/vfs.h: Ditto.
2646 * include/sys/wait.h: Ditto.
2647 * regexp/regerror.c: Ditto.
2648 * regexp/regexp.h: Ditto.
2649 * regexp/regmagic.h: Ditto.
2650
95a8465b
CF
2651Mon Mar 5 01:25:03 2001 Christopher Faylor <cgf@cygnus.com>
2652
2653 * dlopen.c (dlopen): Return NULL when name is NULL (suggested by
2654 chrisiasci@aol.com).
2655
2656 * cygwin.din: Add a new, internally used export -
2657 _check_for_executable.
2658 * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries.
2659 Pass user_data to premain functions.
2660 * fhandler.cc (fhandler_disk_file::open): Only check for executable if
fb1a9f35 2661 the linked program is interested in the executable bit.
95a8465b
CF
2662 (fhandler_disk_file::check_execable_p): Delete.
2663 * fhandler.h (executable_states): New enumeration of various states of
2664 executable bit caring.
2665 (fhandler_base::set_execable_p): New method.
2666
2667 * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal
2668 has been sent to the tty. Return -1 when this is so.
2669 * fhandler_console.cc (fhandler_console::read): Return -1 when signal
2670 sending character encountered.
2671
2672 * path.cc (path_conv::check): Record when path refers to a disk device.
2673 Move executable extension check here.
2674 (check_sysfile): Accomodate new EXEC path states.
2675 (has_suffix): Remove.
2676 (next_suffix): Remove.
2677 (class suffix_scan): New clas.
2678 (suffix_scan::has): New method.
2679 (suffix_scan:next): New method.
2680 (symlink_info::check): Use suffix_scan method to control for scanning
2681 for suffixes.
2682 * path.h (path_conv::exec_state): New method.
2683 * perprocess.h: Make "C" friendly.
2684 * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC.
2685 Bump CYGWIN_VERSION_API_MINOR.
2686 * include/sys/cygwin.h: Change premain declarations.
2687
2688 * winsup.h: Move __cplusplus test to after builtin defines.
2689
306c4b67
ED
26902001-03-04 Egor Duda <deo@logos-m.ru>
2691
2692 * fhandler.h (class fhandler_tty_common): New mutex and event to
2693 syncronize input on master tty with slave tty.
2694 * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to
2695 syncronize with slave.
2696 * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and
2697 event to syncronize with master. Do not limit amount of data read
2698 from master to vmin value. Interrupt on signal and return already
2699 read data, if any.
2700 * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and
2701 event.
2702 * fhandler_tty.cc (fhandler_tty_common::close): Ditto.
2703 * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
2704 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto.
2705 * fhandler_tty.cc (fhandler_tty_common::dup): Ditto.
2706 * tty.h (tty::open_input_mutex): New function.
2707 * tty.cc (tty::common_init): Create input mutex and event.
2708
ed94def2
CV
2709Fri Mar 2 13:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
2710
2711 * dir.cc (readdir): Fix creating path in symlink check.
2712
e03f5f73
CV
2713Fri Mar 2 12:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
2714
2715 * dir.cc (readdir): Fix shortcut==symlink condition.
2716 * environ.cc: Add extern decl for `allow_winsymlinks'.
2717 (struct parse_thing): Add entry for `[no]winsymlinks'.
2718 * path.cc (symlink): Change to be able to create both,
2719 symlink==shortcut and symlink==systemfile, dependent of
2720 the setting of `allow_winsymlinks'.
2721 * security.cc (cygwin_logon_user): Add debug output.
2722 * shortcut.c: Add defines from path.h.
2723 (has_exec_chars): Copy from path.h.
2724 (check_shortcut): Check for executable file condition if not a
2725 shortcut.
2726
903c330d
CF
2727Thu Mar 1 21:06:07 2001 Christopher Faylor <cgf@cygnus.com>
2728
2729 * exceptions.cc (sig_handle_tty_stop): Ignore attempts to suspend a
2730 process if started by non-cygwin parent.
2731
d80999a1
CF
2732Thu Mar 1 20:48:11 2001 Christopher Faylor <cgf@cygnus.com>
2733
2734 * select.cc (peek_console): Don't report read_ready on mouse events
2735 unless we are looking for mouse events.
2736 * fhandler.h (fhandler_console::mouse_aware): New method.
2737
2de76014
CV
2738Wed Feb 28 15:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
2739
2740 * uinfo.cc: Eliminate `#include <wchar.h>'.
2741
739db26a
ED
27422001-02-28 Egor Duda <deo@logos-m.ru>
2743
2744 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Determine
2745 drive geometry or partition size to allow seeking from the end of
2746 raw floppy device. Don't allow positioning past the end of media or
2747 to offsets bigger then max off_t.
2748
a53136cc
ED
27492001-02-27 Egor Duda <deo@logos-m.ru>
2750
2751 * fhandler.h (class fhandler_console): Make all variables that
2752 describe "state" of console to be members of fhandler_console.
2753 default_color is now the color which is set when console recieves
2754 reset command.
2755 * fhandler_console.cc (fhandler_console::fhandler_console): Turn
2756 mouse handling and raw keyboard mode off by default. Initialize
2757 state information.
2758 * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
2759 function.
2760 * fhandler_console.cc (fhandler_console::set_default_attr): New
2761 function. Reset console attributes to default values.
2762 * fhandler_console.cc (fhandler_console::open): Reset attributes.
2763 * fhandler_console.cc (fhandler_console::get_win32_attr): New function.
2764 Calculate win32-style console attribute based on terminal attributes.
2765 * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use
2766 member variable.
2767 * fhandler_console.cc (fhandler_console::read): If in raw-win32
2768 keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
2769 sequences.
2770 * fhandler_console.cc (fhandler_console::dup): Copy all state
2771 information to the dup()ed handle.
2772 * fhandler_console.cc (fhandler_console::scroll_screen): Use current
2773 fill-in attribute.
2774 * fhandler_console.cc (fhandler_console::clear_screen): Ditto.
2775 * fhandler_console.cc (fhandler_console::char_command): Check if we
2776 saw '?' symbol by member variable. Set terminal attributes on \033[Xm
2777 commands. \033[24m - turn off underline mode, \033[27m - turn off
2778 reverse mode, \033[39m - restore default foreground color.
2779 \033[49m - restore default background color. \033[2000h - turn on raw
2780 keyboard mode, \033[2000l - turn off raw keyboard mode.
2781 * fhandler_console.cc (fhandler_console::write): Set attribues to
2782 default values on reset command.
2783
5b331f1e 27842001-02-26 Mike Simons <msimons@moria.simons-clan.com>
efd76e41 2785
5b331f1e
CF
2786 * times.cc (settimeofday): Replace function stub with working code.
2787
88429768
CV
2788Mon Feb 26 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
2789
2790 * strace.cc (strace::vprntf): Move prntf functionality to this function
2791 adding an va_list interface to strace.
2792 (strace::printf): Calls strace::vprntf now.
2793 (strace_printf): New function providing an extern "C" interface to
2794 trace output.
2795 * include/sys/strace.h: Make plain C clean.
2796 (class strace): Add `vprntf' method.
2797
6626ebfe
CV
2798Mon Feb 26 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
2799
2800 * shortcut.c: Remove #include <sys/strace.h>.
2801
649033a8
CV
2802Sun Feb 25 10:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
2803
2804 * path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
2805
80ed95f2
CV
2806Sun Feb 25 10:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
2807
649033a8 2808 * shortcut.c (check_shortcut): Change symlink condition.
80ed95f2 2809
675412e9
CV
2810Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
2811
2812 * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
2813 * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
2814
ff413a98
CV
2815Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
2816
2817 * path.cc (symlink): Keep relative paths relative in the DOS
659b480b
CV
2818 path inside of a shortcut. If that's impossible or the target
2819 path is already absolute save an absolute path.
ff413a98 2820
c5a4eacc
CV
2821Thu Feb 22 15:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
2822
2823 * cygerrno.h: Revert previous patch.
2824 * errno.cc: Ditto.
2825 * dir.cc: Eliminate `dir_suffixes'.
2826 (opendir): Remove usage of `dir_suffixes'.
2827 (rmdir): Ditto.
2828 * fhandler.cc (fhandler_disk_file::open): Remove usage of
2829 `inner_suffixes'.
2830 * path.cc: Rename `inner_suffixes' to `lnk_suffixes'.
2831 (path_conv::check): Remove usage of `inner_suffixes'.
2832 (symlink): Ditto.
2833 (symlink_info::check): Handle checking for `.lnk' in path_conv
2834 exclusively here.
2835 (chdir): Remove usage of `dir_suffixes'.
2836 * shortcut.c: Eliminate debug_printf lines.
2837 (check_shortcut): Don't set error except on failing ReadFile.
2838 * spawn.cc: Remove ".lnk" from `std_suffixes'.
2839 * syscalls.cc (_unlink): Remove usage of `inner_suffixes'.
2840 Remove ".lnk" from `stat_suffixes'.
2841 (_rename): Add check for renaming a symlink to keep the ".lnk"
2842 suffix after renaming.
2843
79e56091
CV
2844Thu Feb 22 13:38:00 2001 Corinna Vinschen <corinna@vinschen.de>
2845
2846 * shortcut.c: New file. Provides a C interface to reading of
2847 Windows shortcuts to avoid compiler flag `-fvtable-thunks'.
2848 * shortcut.h: Ditto.
2849 * Makefile.in: Add shortcut.o to DLL_OFILES.
2850 * cygerrno.h: Provide a C interface to `geterrno_from_win_error' for
2851 using in shortcut.c.
2852 * errno.cc (geterrno_from_win_error): Define as extern "C".
2853 * path.cc (struct symlink_info): Remove methods `check_shortcut' and
2854 `check_sysfile'.
2855 (shortcut_header): Move to shortcut.c.
2856 (shortcut_initalized): Ditto.
2857 (create_shortcut_header): Ditto.
2858 (cmp_shortcut_header): Ditto.
2859 (symlink_info::check_shortcut): Ditto. Reorganize as a plain C function.
2860 (symlink_info::check_sysfile): Redefine as a global function using the
2861 same parameter list as `check_shortcut' for clearness.
2862 (symlink_info::check): Change parameter list for calls to
2863 `check_shortcut' and `check_sysfile'.
2864
87e6b098
CV
2865Thu Feb 22 12:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
2866
2867 * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' when
2868 resolving real_path.
2869 * path.cc (symlink): Ditto for win32_topath.
2870
10b06c5e
CV
2871Wed Feb 21 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
2872
2873 * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.
2874 * autoload.cc: Add LoadDLLinitfunc for ole32.dll.
2875 Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0
2876 and CoCreateInstance@20.
2877 * dir.cc (dir_suffixes): New datastructure.
2878 (readdir): Check for R/O *.lnk files to hide the suffix.
2879 (opendir): Use `dir_suffixes' in path conversion.
2880 (rmdir): Ditto.
2881 * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag
2882 before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY
2883 into account only if the file is no symlink.
2884 * path.cc (inner_suffixes): New datastructure.
2885 (SYMLINKATTR): Eliminated.
2886 (path_conv::check): Use `inner_suffixes' on inner path components.
2887 (shortcut_header): New global static variable.
2888 (shortcut_initalized): Ditto.
2889 (create_shortcut_header): New function.
2890 (cmp_shortcut_header): Ditto.
2891 (symlink): Create symlinks by creating windows shortcuts. Preserve
2892 the old code.
2893 (symlink_info::check_shortcut): New method.
2894 (symlink_info::check_sysfile): Ditto.
2895 (symlink_info::check): Check for shortcuts. Move code reading
2896 old system attribute symlinks into symlink_info::check_sysfile().
2897 (chdir): Use `dir_suffixes' in path conversion.
2898 * security.cc (get_file_attribute): Check for S_IFLNK flag.
2899 Force 0777 permissions then.
2900 * spawn.cc (std_suffixes): Add ".lnk" suffix.
2901 * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion.
2902 Check for shortcut symlinks to eliminate R/O attribute before
2903 calling DeleteFile().
2904 (stat_suffixes): Add ".lnk" suffix.
2905 (stat_worker): Force 0777 permissions if file is a symlink.
2906
0917ed59
ED
29072001-02-21 Egor Duda <deo@logos-m.ru>
2908
2909 * sigproc.cc (getsem): Make semaphore always non-inheritable.
2910
441d7aee
CF
2911Mon Feb 19 22:25:53 2001 Christopher Faylor <cgf@cygnus.com>
2912
2913 * dcrt0.cc (locale_init): Remove.
2914
f97e7d75
CF
29152001-02-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2916
2917 * cygwin.din: Export rand48 functions.
2918 * thread.cc (MTinterface::Init): Remove the initialization of
2919 `reent_data'.
2920 * dcrt0.cc: Add the initalizer to the declaration of `reent_data'.
2921 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
2922
fc68bf34
ED
29232001-02-16 Egor Duda <deo@logos-m.ru>
2924
2925 * signal.cc (signal): Prohibit setting handlers for SIGKILL and
2926 SIGSTOP
2927 * signal.cc (sigaction): Ditto
2928 * syscalls.cc (_lseek): Return EINVAL on invalid input
2929
ee2c7251
CF
2930Wed Feb 14 14:54:40 2001 Christophe Iasci <chrisiasci@aol.com>
2931
2932 * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when
2933 the library is not found
2934
8f8e7442 29352001-02-14 Egor Duda <deo@logos-m.ru>
efd76e41 2936
8f8e7442
CF
2937 * fhandler_console.cc (fhandler_console::char_command): Ignore unknown
2938 rendition codes in \033[xx;yym control sequences
2939
cde0c2fb
CF
2940Fri Feb 9 23:19:01 2001 Christopher Faylor <cgf@cygnus.com>
2941
2942 * fork.cc (fork_parent): Return EAGAIN when can't record pid.
2943 * pinfo.h (pinfo::remember): Return value of call to proc_subproc.
2944 * sigproc.cc (proc_subproc): Return error if can't record pid.
2945
c41482c7
CF
2946Fri Feb 9 12:17:27 2001 Christopher Faylor <cgf@cygnus.com>
2947
2948 * syscalls.cc (mknod): Add valid parameters.
2949
889109ab
CV
2950Thu Feb 8 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
2951
2952 * mmap.cc (mmap): Check for reusing a mapping only on MAP_SHARED
2953 and on MAP_PRIVATE|MAP_ANON in the special case of offset 0.
2954
db49d0b5
CV
2955Thu Feb 8 21:57:00 2001 Corinna Vinschen <corinna@vinschen.de>
2956
2957 * mmap.cc (class list): Add member `hash'.
2958 (list::list): Initialize `hash'.
2959 (list::get_list_by_fd): Use filepath hash value to get the correct
2960 mapping list if it's not an anonymous mapping.
2961 (map::add_list): Initialize `hash' with filepath hash value.
2962 (mmap): Check for reusing a mapping only on MAP_SHARED.
2963
91d385fe
CF
2964Wed Feb 7 18:47:36 2001 Christopher Faylor <cgf@cygnus.com>
2965
2966 * signal.cc (killpg): Correct first argument.
2967
9182099c
CV
2968Wed Feb 7 22:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
2969
2970 * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
2971 Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12.
2972 * fhandler_socket.cc (fhandler_socket::ioctl): Move variable
2973 definitions to the beginning of the function to allow better debugging.
2974 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
2975 * net.cc: Include iphlpapi.h.
2976 (get_2k_ifconf): Rewritten. Uses IP Helper API now.
2977 (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC
2978 and SIOCGIFMTU.
2979 (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'.
2980 (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux.
2981 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
2982 Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only
2983 on Windows NT < Service Pack 3, `get_2k_ifconf otherwise.
2984 * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC
2985 and SIOCGIFMTU.
2986 * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'.
2987 (struct ifreq): Add `ifru_hwaddr'.
2988
d7ed877b
CV
2989Tue Feb 6 15:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
2990
2991 * syscalls.cc (stat_worker): Add a check for the special case when
2992 a process creates a file using mode 000 using ntsec.
2993
ae9b22c6
CV
2994Mon Feb 5 17:00:00 2001 Corinna Vinschen <corinna@vinschen.de>
2995
2996 * fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
2997 when opening raw disk devices.
2998 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
2999 access.
3000 * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
3001 binary.
3002 (fhandler_dev_raw::raw_write): Don't drop read buffer content when
3003 writing after read.
3004
cada03f9
CV
3005Mon Feb 5 13:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
3006
3007 * mmap.cc (mmap_record::fixup_map): New method to duplicate
3008 the memory protection in a just forked child.
3009 (mmap): Realign gran_len to page boundary only on anonymous
3010 mapping before saving in the mmap_record.
3011 (munmap): Cleanup code.
3012 (msync): Ditto.
3013 (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
3014
47f81092
CF
3015Thu Feb 1 23:08:29 2001 Christopher Faylor <cgf@cygnus.com>
3016
3017 * cygheap.cc (creturn): Correctly calculate cygheap_max.
3018
f8da1507
CF
3019Wed Jan 31 10:04:58 2001 Christopher Faylor <cgf@cygnus.com>
3020
3021 * shared.cc (shared_info::initialize): Reduce size of heap.
3022
83443511
CV
3023Wed Jan 31 13:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
3024
3025 * include/sys/resource.h: Fix typo.
3026
44e6d951
CV
3027Wed Jan 31 13:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
3028
83443511 3029 * include/sys/resource.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.
44e6d951 3030
4f42df7b
CF
3031Tue Jan 30 18:15:23 2001 Christopher Faylor <cgf@cygnus.com>
3032
3033 * include/cygwin/version.h: Bump version to 1.3.0.
3034
9928a7e1
CV
3035Tue Jan 30 8:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
3036
3037 * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead of
3038 explicit cast (HANDLE) 0xffffffff.
3039 * shared.cc (open_shared): Ditto.
3040
747e88d3
CF
3041Mon Jan 29 17:15:22 2001 Bill Hegardt <bill@troyxcd.com>
3042
3043 * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED
3044 structure instead of shared structure to fix a race condition between
3045 read/write.
3046
68ea0dc2
CV
3047Mon Jan 29 14:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
3048
3049 * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as
3050 being invalid.
3051
f977222f
CV
3052Mon Jan 29 10:23:00 2001 Corinna Vinschen <corinna@vinschen.de>
3053
3054 * mmap.cc (mmap_record::find_empty): Fix loop condition.
3055
6a4878cf
CF
3056Sun Jan 28 19:40:40 2001 Christopher Faylor <cgf@cygnus.com>
3057
3058 * syscalls.cc (_link): Make sure that newpath does not exist. Set
3059 errno if it does.
3060
3061Sun Jan 28 19:29:08 2001 Christopher Faylor <cgf@cygnus.com>
3062
3063 * cygheap.cc (init_cheap): Don't specify a load address for the heap.
3064 It doesn't work on #!*& Windows 9x.
3065 (cygheap_init): Move GetUserName to memory_init.
3066 * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call
3067 to heap_init.
3068 * heap.cc (heap_init): Improve error output.
3069 * heap.h: Correct some declarations.
3070 * shared.cc (mount_table_init): Remove.
3071 (memory_init): Renamed from shared_init. Reorganize to accomodate
3072 strange Windows 9x problems with cygheap/heap interaction.
3073 * shared_info.h: Rename shared_init to memory_init.
3074
ae6c8e4f
CF
3075Sun Jan 28 01:25:33 2001 Christopher Faylor <cgf@cygnus.com>
3076
3077 * include/cygwin/version.h: Bump API version.
3078
9a089f21
CF
3079Sun Jan 28 01:18:22 2001 Christopher Faylor <cgf@cygnus.com>
3080
3081 * cygheap.cc (init_cheap): Move username initialization.
3082 (cygheap_init): Here.
3083 * shared_info.h (mount_info): Add a sys_mount_table_counter field.
3084 (shared_info): Ditto.
3085 * path.cc (mount_info::conv_to_win32_path): Check that our mount table
3086 is in sync with the system mount table and reinitialize it if not.
3087 (mount_info::add_reg_mount): Bump sys_mount_table counters if the
3088 system mount table changes.
3089 (mount_info::del_reg_mount): Ditto.
3090 (mount_info::write_cygdrive_info_to_registry): Ditto.
3091 (mount_info::remove_cygdrive_info_from_registry): Ditto.
3092
2a6fc028
CF
3093Sun Jan 28 00:28:30 2001 Christopher Faylor <cgf@cygnus.com>
3094
3095 Throughout, change 'cygwin_shared.mount' to 'mount_table'.
3096 * child_info.h (child_info): Move shared_h, console_h to cygheap. Add
3097 mount_h.
3098 * cygheap.h (init_cygheap): Add shared_h, console_h.
3099 * cygheap.cc (init_cheap): Initialize heap at a fixed location after
3100 the shared memory regions. Initialize cygheap->user name here.
3101 * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants.
3102 Remove cygheap_init since it is done in shared_init now.
3103 (_dll_crt0): Initialize mount_h, remove shared_h and console_h
3104 initialization.
3105 * fhandler_console.cc (console_shared_h): Eliminate.
3106 (get_tty_stuff): Use cygheap->console_h rather than console_shared_h.
6a4878cf
CF
3107 * heap.cc (heap_init): Use page size constant calculated earlier in
3108 initialization.
2a6fc028
CF
3109 * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h.
3110 (mount_table_init): New function for initializing a user mount table.
6a4878cf
CF
3111 (open_shared_file_map): Use constant for shared memory region.
3112 Initialize cygheap and mount table here.
2a6fc028
CF
3113 (open_shared): Improve debugging output.
3114 (shared_info::initialize): Eliminate call to mount.init.
3115 (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h.
3116 (open_shared_file_map): Eliminate.
3117 * shared_info.h (mount_info): Add a version field.
6a4878cf
CF
3118 (shared_align_past): New macro for calculating location for shared
3119 memory regions.
2a6fc028 3120 * sigproc.cc (init_child_info): Eliminate shared_h, console_h.
6a4878cf
CF
3121 * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different
3122 user.
2a6fc028
CF
3123 * syscalls.cc (system_info): New global holding system memory defaults.
3124 (getpagesize): Use system_info.
3125 * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent.
3126 * winsup.h: Declare system_info.
3127
6a4878cf
CF
3128 * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than
3129 retrieving the name again.
2a6fc028 3130
bdfeca60
CF
3131Sat Jan 27 10:18:02 2001 Christopher Faylor <cgf@cygnus.com>
3132
3133 * path.cc (path_conv::check): Detect when path has symlinks.
3134 (symlink_info::check): Remove debugging stuff.
3135 (chdir): Use posix'ized win32 path if cd'ed to a path using symlinks.
3136
206a8d88
CF
3137Fri Jan 26 21:20:28 2001 Christopher Faylor <cgf@cygnus.com>
3138
3139 * exceptions.cc (sigreturn): Call any pending signals prior to
3140 resetting the signal mask so that stacked signals behave correctly.
3141 (sigdelayed): Avoid a race where a signal could end up calling an
3142 incorrect signal handler if two signals come in close together.
3143
174f1a39
CV
3144Tue Jan 23 21:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
3145
3146 * mmap.cc (fhandler_disk_file::mmap): Call CreateFileMapping with
3147 len != 0 only when performing an anonymous mapping.
3148
4c7b8250
CF
3149Mon Jan 22 15:35:28 2001 Christopher Faylor <cgf@cygnus.com>
3150
3151 * path.h: Add a new constant.
3152 * syscalls.cc (_read): Oscillate errno check.
3153
c65a3183
CF
3154Mon Jan 22 15:27:12 2001 Christopher Faylor <cgf@cygnus.com>
3155
3156 * include/cygwin/version.h: Bump API to reflect setlogmask.
3157
29c39fe3
CF
3158Sun Jan 21 22:40:25 2001 Jason Tishler <jt@dothill.com>
3159
3160 * cygwin.din: Add export for setlogmask().
3161 * syslog.cc (setlogmask): New function.
3162
c807d355
CV
3163Thu Jan 18 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
3164
3165 * resource.cc (setrlimit): Support RLIMIT_NOFILE.
3166
4e2a97b2
CF
3167Wed Jan 17 23:23:12 2001 Christopher Faylor <cgf@cygnus.com>
3168
3169 * syscalls.cc (setdtablesize): Call with amount to increment not total
3170 amount. Return success or failure error code.
3171
a7cde2b9
CF
3172Wed Jan 17 09:47:13 2001 Christopher Faylor <cgf@cygnus.com>
3173
3174 * autoload.cc (LoadDLLinitfunc): Remove debugging statement.
3175
3176 * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to
3177 earlier in interrupt.
99a5bd2f 3178 (interrupt_setup): i.e., here.
a7cde2b9
CF
3179 (sig_handle): Don't queue multiple SIGSTOPS.
3180 * fhandler.h (bg_check_types): Enumerate return value of bg_check for
3181 clarity.
3182 * signal.cc (kill_pgrp): Minor cleanup.
3183 * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type
3184 for function return. Don't raise signal if a signal is already queued.
3185 * fhandler_console.cc (fhandler_console::read): Use enumerated return
3186 type for bg_check.
3187 * select.cc: Ditto, throughout.
3188 * read.cc: Ditto, throughout.
3189 * termios.cc: Ditto, throughout.
3190 (_read): YA interrupt detect simplification.
3191 * wait.cc (wait4): Ditto.
3192
cb503978
CV
3193Wed Jan 17 10:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
3194
3195 * cygheap.cc (cygheap_user::~cygheap_user): Temporarily
3196 disable free'ing memory.
3197
9fedfd57
CV
3198Tue Jan 16 18:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
3199
3200 * mmap.cc (mmap): Initialize fh to avoid compiler warnings.
3201
9470a80c
CF
3202Mon Jan 15 21:07:00 2001 Christopher Faylor <cgf@cygnus.com>
3203
3204 * wait.cc (wait4): Rename variable for consistency. Allow restartable
3205 signal behavior.
3206
9334c89c
CV
3207Mon Jan 15 23:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
3208
3209 * mmap.cc (mmap): Add more parameter checking. Change error output
3210 in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
3211
c6dd43f2
CV
3212Mon Jan 15 20:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
3213
3214 * mmap.cc: include <unistd.h>. Define some bit operations for
3215 the new page map.
3216 (mmap_record): Change type of base_address_ to caddr_t.
3217 Add map_map_ member. Add several methods to manipulate map_map_.
3218 (mmap_record::alloc_map): New method.
3219 (mmap_record::free_map): Ditto.
3220 (mmap_record::find_empty): Ditto.
3221 (mmap_record::map_map): Ditto.
3222 (mmap_record::unmap_map): Ditto.
3223 (list::add_record): Change return type to `mmap_record *'.
3224 Allocate page map.
3225 (list::match): New method.
3226 (mmap): Partly rewritten to take care for the new page map. Add some
3227 parameter checking.
3228 (munmap): Ditto.
3229
66097f06
CV
3230Mon Jan 15 13:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
3231
3232 * heap.cc (heap_init): Fix extern declaration of getpagesize.
3233 * syscalls.cc (getpagesize): Fix another typo.
3234
dc3651b6
CV
3235Mon Jan 15 12:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
3236
3237 * syscalls.cc (getpagesize): Save pagesize in global variable to
3238 avoid calling GetSystemInfo too often.
3239 * heap.cc (getpagesize): Eliminate.
3240 (heap_init): Use getpagesize function from syscalls.cc.
3241
4cf2c0e0
CV
3242Mon Jan 15 11:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
3243
3244 * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZE
3245 request to avoid implementing the same twice.
3246
a3ec080b
CF
3247Sun Jan 14 14:07:50 2001 Christopher Faylor <cgf@cygnus.com>
3248
3249 * syscalls.cc (_read): Use more lightweight method for determining if
3250 read has been interrupted by a signal.
3251
c3d62298
CF
3252Fri Jan 12 00:35:15 2001 Christopher Faylor <cgf@cygnus.com>
3253
3254 * debug.h: Add regparm attributes to some functions.
3255
3256 * signal.cc (sigaction): Don't treat SIGCONT specially.
3257
6a4878cf
CF
3258 * exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal
3259 for later use.
c3d62298
CF
3260 (sig_handler): Default any stopping signal to SIGSTOP.
3261 (call_signal_handler): New function.
3262 (sigdelayed0): New function.
6a4878cf
CF
3263 * sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special
3264 behavior.
c3d62298
CF
3265 * sigproc.h: Define call_signal_handler.
3266 * syscalls.cc (_read): Allow restartable signal behavior.
3267
c4efddf6
CV
3268Thu Jan 11 13:17:00 2001 Corinna Vinschen <corinna@vinschen.de>
3269
3270 * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.
3271 (fhandler_disk_file: Ditto.
3272 (fhandler_dev_mem): Ditto.
3273 * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute
3274 for device\physicalmemory handle.
3275 (fhandler_dev_mem::mmap): Ditto.
6a4878cf
CF
3276 * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New
3277 method.
3278 * mmap.cc (mmap_record): Add private `fdesc_' member. Change
3279 constructor accordingly.
c4efddf6
CV
3280 (get_fd): New method.
3281 (mmap): Use new mmap_record constructor.
3282 (fhandler_base::fixup_mmap_after_fork): New method.
3283 (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
6a4878cf 3284 (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate
c4efddf6
CV
3285 fhandler class.
3286
7416e1d2
CF
3287Wed Jan 10 22:08:30 2001 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
3288
3289 * sigproc.cc (wait_sig): Allow SIGCONT when stopped.
3290
55ae1dff
CV
3291Tue Jan 9 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
3292
3293