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