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