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