]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* path.cc (path_conv::check): Revert allow_ntsec check so that volume info is
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
df7320e1
CF
1Sun May 13 22:49:04 2001 Christopher Faylor <cgf@cygnus.com>
2
3 * path.cc (path_conv::check): Revert allow_ntsec check so that volume
4 info is always retrieved and isdisk setting is properly set.
5
49a8c92c
CF
6Sun May 13 14:02:36 2001 Christopher Faylor <cgf@cygnus.com>
7
8 * fhandler_tty.cc (fhandler_tty_common::dup): Preserve O_NOCTTY when
9 duping a filehandle.
10
cbedbdd0
CV
11Sat May 12 18:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
12
13 * dir.cc (rmdir): Rearrange slightly to allow removing directories
14 even when R/O attribute is set.
15
c3a245f5
CF
16Fri May 11 16:53:38 2001 Christopher Faylor <cgf@cygnus.com>
17
18 * external.cc (fillout_pinfo): Use correct pids.
19 * path.cc (mount_info::conv_to_win32_path): Correct test for whether to
20 include a slash.
21
5bba0cb5
CF
22Fri May 11 01:04:17 2001 Christopher Faylor <cgf@cygnus.com>
23
24 * exceptions.cc (handle_exceptions): Don't print message when executing
25 from a cygwin program.
26
723190cf
CF
272001-05-10 Egor Duda <deo@logos-m.ru>
28 Christopher Faylor <cgf@redhat.com>
29
30 * environ.cc (winenv): Always add SYSTEMDRIVE and SYSYEMROOT to
31 win32-style environment if they don't already exist.
32
cedb00be
CF
332001-05-10 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
34
35 * path.cc (mount_info::conv_to_win32_path): Treat UNC paths the same as
36 paths including `:' or `\'.
37
cd94b71c
CF
38Wed May 9 14:46:32 2001 Christopher Faylor <cgf@cygnus.com>
39
40 * fhandler.h (fhandler_termios::echo_erase): Declare new method.
41 * fhandler_termios.cc (fhandler_termios::echo_erase): New method for
42 echoing erase characters.
43 (fhandler_termios::line_edit): Check the echo flag before echoing
44 control characters (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>).
45
00b59ce9
CF
46Wed May 9 10:43:30 2001 Christopher Faylor <cgf@cygnus.com>
47
48 * include/pthread.h: Remove C++ comment.
49
79201150
CF
50Tue May 8 11:09:59 2001 Christopher Faylor <cgf@cygnus.com>
51
52 * cygheap.cc (_cfree): Add regparm attribute.
53 (_crealloc): Ditto.
54
55 * dcrt0.cc (dll_crt0_1): Default to always checking for executable for now.
56
57 * dtable.cc (dtable::not_open): Move method.
58 * dtable.h (dtable): Here.
59
60 * exceptions.cc (ctrl_c_handler): Don't expect process group leader to
61 handle a signal if it doesn't exist.
62
63 * fhandler.h (fhandler_base): Make openflags protected.
64
65 * localtime.c (tzsetwall): Check for __CYGWIN__ as well as __WIN32__.
66
67 * path.cc (path_conv::check): Add some comments. Change strcat to assignment.
68
69 * lib/_cygwin_S_IEXEC.cc (_cygwin_bob__): Eliminate.
70
71 * fhandler_tty.cc (fhandler_console::dup): Set controlling terminal if necessary.
72 * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
73
ef8b6590
CF
74Mon May 7 21:33:17 2001 Christopher Faylor <cgf@cygnus.com>
75
76 * include/sys/file.h: Revert special X_OK usage. Just make it a
77 constant.
78
68ebd3f6 79Sun May 6 17:05:00 2001 Robert Collins <rbtcollins@hotmail.com>
ef8b6590
CF
80
81 * thread.h (pthread_cond): New element cond_access to allow atomic
82 broadcasts.
68ebd3f6
RC
83 * thread.cc (pthread_cond::pthread_cond): Initialise cond_access.
84 (pthread_cond::~pthread_cond): Destroy cond_access.
85 (pthread_cond::Broadcast): Use cond_access.
86 (pthread_cond::Signal): Use cond_access.
87 (pthread_cond_wait): Use cond_access.
88 (pthread_cond_timedwait): Use cond_access.
89
2bfb9665
CF
90Sun May 6 11:55:40 2001 Christopher Faylor <cgf@cygnus.com>
91
92 * string.h (cygwin_strchr): Make 'static inline' so that things will
93 still work when optimized.
94
11ba5ef4
CF
95Sat May 5 01:04:11 2001 Christopher Faylor <cgf@cygnus.com>
96
97 * exceptions.cc (handle_exceptions): Vastly increase test for exception
98 loop guard variable.
99
f598d941
CF
100Fri May 4 22:23:33 2001 Christopher Faylor <cgf@cygnus.com>
101
102 * exceptions.cc (stack_info): Add some controls.
103 (stack_info::init): Add extra arguments to control method of
104 initialization.. If we have a known good frame, set things up so that
105 this frame is not skipped the first time through. Record whether
106 caller cares about arguments or not.
107 (stack_info::walk): Don't store arguments if they're unwanted.
108 (stackdump): Add isexception parameter for use when called by exception
109 handler.
110 (cygwin_stackdump): Accomodate extra argument to stackdump.
111 (handle_exceptions): Ditto.
112 (sig_handle): Ditto.
113 (interrupt_on_return): Accomodate extra arguments to stack walk
114 initialization.
115
d7490eaa
CF
116Fri May 4 21:05:20 2001 Christopher Faylor <cgf@cygnus.com>
117
118 * localtime.c: Revert exclusion of windows.h.
119
6731c77e
CF
120Fri May 4 17:03:16 2001 Christopher Faylor <cgf@cygnus.com>
121
122 * string.h: Fix last-minute typo.
123
63b61cd1
CF
124Fri May 4 16:49:34 2001 Christopher Faylor <cgf@cygnus.com>
125
126 * pinfo.h: Correctly set __SIGOFFSET.
127
128 * path.cc (hash_path_name): Avoid calling library functions for simple
129 copying of characters.
130
131 * shortcut.c: Use WIN32_LEAN_AND_MEAN.
132 * smallprint.c: Ditto.
133
134 * environ.cc (getwinenv): Minor clarity fix.
135
136 * localtime.c: No need to include windows.h
137
138 * string.h: New file.
139
17743fbc
CF
140Fri May 4 16:37:30 2001 Christopher Faylor <cgf@cygnus.com>
141
142 * exceptions.cc (ctrl_c_handler): Always send signal to process if it
143 has no tty.
144
69b218bf
ED
1452001-05-04 Egor Duda <deo@logos-m.ru>
146
147 * fhandler_socket.cc (set_connect_secret): Use /dev/urandom to
148 generate secret cookie.
149
620dd06d
CF
150Thu May 3 16:37:55 2001 Christopher Faylor <cgf@cygnus.com>
151
152 * include/pthread.h (pthread_cleanup_push): Eliminate space preceding
153 arguments.
154 (pthread_cleanup_pop): Ditto.
155
6c22ecdd
CV
156Thu May 3 18:16:00 2001 Corinna Vinschen <corinna@vinschen.de>
157
158 * net.cc (wsock_init): Rename `was_in_progress' to `wsock_started'
159 for clearness.
160
70c7f359
CF
161Thu May 3 10:44:16 2001 Christopher Faylor <cgf@cygnus.com>
162
163 * exceptions.cc (handle_exceptions): Break out of "loop" if the
164 debugger doesn't seem to be attaching to our process.
165
a6a0193b
CV
166Wed May 2 20:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
167
168 * autoload.cc: Use new definition of LoadDLLinitfunc throughout.
169 Redefine wrapper for wsock32.dll and ws2_32.dll.
170 (std_dll_init): New function.
171 * autoload.h: Rename LoadDLLinitfunc to LoadDLLinitfuncdef.
172 Add new defines LoadDLLinitfunc and LoadDLLstdfunc.
173 * net.cc (wsock_init): Add guard variable handling. Take care
174 to call WSAStartup only once. Load WSAStartup without using
175 autoload wrapper to eliminate recursion. Eliminate FIONBIO
176 and srandom stuff.
177
4c265f4a
CF
178Tue May 1 01:26:15 2001 Christopher Faylor <cgf@cygnus.com>
179
180 * path.cc (mount_info::conv_to_win32_path): More path tweaking.
181
beab320f
CF
182Tue May 1 00:34:46 2001 Christopher Faylor <cgf@cygnus.com>
183
184 * path.cc (mount_info::conv_to_win32_path): Fix debugging output to
185 avoid a SIGSEGV. Avoid double backslashes in middle of filename.
186
d3c7e9de
CF
187Mon Apr 30 21:51:14 2001 Christopher Faylor <cgf@cygnus.com>
188
189 * path.cc (mkrelpath): New function.
190 (mount_info::conv_to_win32_path): Eliminate now-unneeded relative path
191 name arg and processing.
192 (path_conv::check): Accomodate relative path names again. Accomodate
193 one extra argument in mount_info::conv_to_win32_path. Tack trailing
194 slash on end of relative path as a side effect, like before.
195 * shared_info.h (mount_info::conv_to_win32_path): Reflect new argument
196 ordering.
197
57ff940d
CV
198Mon Apr 30 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
199
200 * autoload.cc: Add LoadDLLinitfunc for secur32.dll.
201 Add LoadDLLfuncEx statements for AllocateLocallyUniqueId@4,
202 DuplicateTokenEx@24, LsaNtStatusToWinError@4,
203 LsaDeregisterLogonProcess@4, LsaFreeReturnBuffer@4,
204 LsaLogonUser@56, LsaLookupAuthenticationPackage@12,
205 LsaRegisterLogonProcess@12,
206 * environ.cc: Add extern declaration for `subauth_id'.
207 (subauth_id_init): New function for setting `subauth_id'.
208 (struct parse_thing): Add entry for `subauth_id'.
209 * fork.cc (fork_parent): Call `RevertToSelf' and
210 `ImpersonateLoggedOnUser' instead of `seteuid'.
211 * security.cc: Define global variable `subauth_id'.
212 (extract_nt_dom_user): New function.
213 (cygwin_logon_user): Call `extract_nt_dom_user' now.
214 (str2lsa): New static function.
215 (str2buf2lsa): Ditto.
216 (str2buf2uni): Ditto.
217 (subauth): Ditto.
218 * security.h: Add prototype for `subauth'.
219 * spawn.cc (spawn_guts): Use cygheap->user.token only if impersonated.
220 Use `cygsid' type. Remove impersonation before allowing access to
221 workstation/desktop to everyone. Call `RevertToSelf' and
222 `ImpersonateLoggedOnUser' instead of `seteuid'.
223 * syscalls.cc (seteuid): Rearranged to allow using subauthentication
224 to retrieve user tokens when needed.
225
965cecdf
CV
226Mon Apr 30 20:26:00 2001 Corinna Vinschen <corinna@vinschen.de>
227
228 * uinfo.cc (internal_getlogin): Formatting change.
229
17db1105
CV
230Mon Apr 30 19:58:00 2001 Corinna Vinschen <corinna@vinschen.de>
231
232 * grp.cc: Eliminate MAX_DOMAIN_NAME define.
233 (read_etc_group): Substitute MAX_DOMAIN_NAME by
234 INTERNET_MAX_HOST_NAME_LENGTH.
235 * passwd.cc (parse_pwd): Don't force pw_name to be lower case.
236 * sec_helper.cc: Substitute MAX_USER_NAME by UNLEN,
237 MAX_COMPUTERNAME_LENGTH by INTERNET_MAX_HOST_NAME_LENGTH throughout.
238 (lookup_name): Slight cleanup.
239 * security.cc (alloc_sd): Substitute MAX_USER_NAME by UNLEN.
240 * security.h: Define DEFAULT_UID as DOMAIN_USER_RID_ADMIN and
241 DEFAULT_GID as DOMAIN_ALIAS_RID_ADMINS.
242 * shared.cc (memory_init): Substitute MAX_USER_NAME by UNLEN.
243 * thread.h: Ditto.
244 * uinfo.cc (internal_getlogin): Substitute MAX_USER_NAME by UNLEN.
245 Substitute MAX_COMPUTERNAME_LENGTH and MAX_HOST_NAME by
246 INTERNET_MAX_HOST_NAME_LENGTH.
247 * winsup.h: Include lmcons.h. Eliminate MAX_USER_NAME and
248 MAX_HOST_NAME. Move DEFAULT_UID and DEFAULT_GID to security.h.
249
c0a45b92
CF
250Mon Apr 30 12:35:40 2001 Christopher Faylor <cgf@cygnus.com>
251
252 * path.cc (path_conv::check): Don't use path_flags when converting to
253 MS-DOS syntax unless parsing tail of path component. Stop parsing path
254 when we reach the 'root' of the path. Correctly copy tail to path
255 component.
256
8abeff1e
CF
257Sun Apr 29 22:28:06 2001 Christopher Faylor <cgf@cygnus.com>
258
259 * exceptions.cc (INIT_EXCEPTION_HANDLER): Eliminate.
260 (init_exceptions): Just use init_exception_handler.
261 (open_stackdumpfile): New function.
262 (stack_info::first_time): Eliminate.
263 (stack_info::init): Set up fields to avoid "first_time" consideration.
264 (stack_info::walk): Remove "first_time" consideration.
265 (stackdump): Change arguments to accept initial frame pointer and open
266 stack file flag.
267 (stack): Eliminate.
268 (cygwin_stackdump): Use stackdump() rather than stack().
269 (try_to_debug): Remove all synchronization logic. Just keep looping in
270 exception handler until debugger notices us. Return 1 if successfully
271 started debugger.
272 (handle_exceptions): Just return if we know that we're debugging.
273 Reorganize to avoid creating a stackdump file if we are starting a
274 debugger. Return from exception handler if debugger started
275 successfully.
276 (sig_handle): Create a stackdump only if debugger wasn't started.
277 * winsup.h (try_to_debug): Add an argument.
278
2b5803d4
CF
279Sun Apr 29 21:41:25 2001 Christopher Faylor <cgf@cygnus.com>
280
281 * path.cc (symlink_info::check): Remove extra arguments, move
282 functionality back to path_conv::check. Clear symlink bit from pflags
283 argument before detecting if this is a symlink.
284 (path_conv::check): Convert posix path here instead of
285 symlink_info::check. Only grab volflags when using ntsec.
286 (symlink_info::check_case): Just replace appropriate part of input
287 path.
288
b98ebf54
CF
289Sat Apr 28 19:36:13 2001 Christopher Faylor <cgf@cygnus.com>
290
291 Throughout, change 'tty_attached' to 'real_tty_attached', for clarity.
292 Throughout, change 'OutputStopped' to 'output_stopped', for
293 consistency.
294 * dtable.cc (stdio_init): Set controlling tty if not set by stdio
295 opens.
296 * exceptions.cc (ctrl_c_handler): Avoid special pgid checking if no tty
297 is associated with the process.
298 (Suggested by Tim Baker <dbaker@direct.ca>)
299 * external.cc (fillout_pinfo): Return actual tty number for ctty.
300 * fhandler_console.cc (get_tty_stuff): Set ctty when shared memory is
301 allocated. Accept flags input from open().
302 (set_console_ctty): New function.
303 (fhandler_console::open): Pass flags to get_tty_stuff and rely on this
304 function to set the ctty, if appropriate.
305 * fhandler_termios.cc (fhandler_termios::set_ctty): Move to tty_min
306 class.
307 * fhandler_tty.cc (fhandler_tty_slave::open): Use tc field to access
308 set_ctty().
309 * tty.h (TTY_CONSOLE): Move to include/sys/cygwin.h.
310 (tty_min): Add set_ctty class here.
311 * include/sys/cygwin.h (TTY_CONSOLE): New home here.
312
313 * path.cc (symlink_info): Make contents an actual buffer. Pass more
314 flags to case_check.
315 (path_conv::check): Reorganize to do parsing based on posix path rather
316 than native path.
317 (symlink_info::check): Expect posix path as input. Translate to native
318 path here. Accept path_conv flags. Stop parsing if not a symlink
319 regardless of whether previous path was a symlink.
320
cba63823
CF
3212001-04-27 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
322
323 * thread.cc (thread_init_wrapper): Use _REENT_INIT to initialize the
324 reent structure of newlib.
325
326Fri Apr 27 14:02:24 2001 Christopher Faylor <cgf@cygnus.com>
327
328 * sigproc.h (sig_send): Add exception parameter to sig_send.
329 * sigproc.cc (sig_send): Ditto. Use it when setting frame info.
330 * exceptions.cc (handle_exceptions): Use exception flag when calling
331 sig_send.
332
a069f560
ED
3332001-04-27 Egor Duda <deo@logos-m.ru>
334
335 * tty.cc (tty::make_pipes): Set to_slave pipe mode to nonblocking.
336 * fhandler_tty.cc (fhandler_pty_master::accept_input): If pipe buffer
337 is full, give slave a chance to read data.
338
22ae5a5b
CV
3392001-04-26 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
340
341 * security.cc (alloc_sd): Add unrelated ACCESS_ALLOWED_ACE behind
342 the `everyone' ACE.
343
968d91b2
CF
344Wed Apr 25 15:07:37 2001 Christopher Faylor <cgf@cygnus.com>
345
fb1a9f35
CF
346 * sigproc.h [sigthread]: Add exception field.
347 [sigframe::~sigframe]: Clear exception field.
348 [sigframe::set]: Set exception field from caller.
968d91b2
CF
349 * sigproc.cc (sig_send): Set exception field when frame pointer is
350 passed in.
351 * exceptions.cc (interrupt_on_return): Always treat exception as
352 interruptible.
353
86699e15
ED
3542001-04-25 Egor Duda <deo@logos-m.ru>
355
356 * cygwin.din: Export asctime_r, ctime_r, gmtime_r, localtime_r
357 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 39
358
edc4bfd9
CF
359Wed Apr 25 10:57:36 2001 Christopher Faylor <cgf@cygnus.com>
360
361 * include/cygwin/version.h: Bump minor version number.
362 * childinfo.h: Bump child structure magic number.
363
feae8d0e
CV
3642001-04-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
365
366 * uinfo.cc (internal_getlogin): Return pointer to struct passwd.
367 (uinfo_init): Accommodate the above change.
368 * syscalls.cc (seteuid): Ditto.
369
d551169a
CV
370Tue Apr 25 11:08:00 2001 Corinna Vinschen <corinna@vinschen.de>
371
372 * autoload.cc: Add LoadDLLfunc statements for SetTokenInformation@16.
373 * cygheap.cc: Include security.h.
374 * grp.cc (internal_getgrent): New function.
375 (getgroups): Rearranged using `internal_getgrent' and the new
376 `cygsid' class.
377 * passwd.cc (internal_getpwent): New function.
378 * sec_acl.cc: Use new `cygsid' class throughout.
379 (acl_access): Use `internal_getgrent' instead of `getgrent'.
380 * sec_helper.cc: Use new `cygsid' class throughout.
381 (get_id_from_sid): Use `internal_getgrent' instead of `getgrent'.
382 Use `internal_getpwent' instead of `getpwent'.
383 * security.cc: Use new `cygsid' class throughout.
384 * security.h: Move `MAX_SID_LEN' from winsup.h to here.
385 Add extern declarations for `internal_getgrent' and `internal_getpwent'.
386 (class cygsid): New class.
387 * shared.cc (sec_user): Use new `cygsid' class.
388 * syscalls.cc (seteuid): Try to set owner to user and primary group to
389 current group in impersonation token before performing impersonation.
390 (setegid): Try to set primary group in process token to the new group
391 if ntsec is on.
392 * uinfo.cc (internal_getlogin): Use new `cygsid' class.
393 Try to set owner to user and primary group to current group in process
394 token if the process has been started from a non cygwin process.
395 (uinfo_init): Set primary group only if the process has been started
396 from a non cygwin process.
397 * winsup.h: Move define for `MAX_SID_LEN' to security.h.
398
3a6e9668
CV
399Mon Apr 16 23:20:00 2001 Andy Younger <andylyounger@hotmail.com>
400
401 * fhandler_dsp.cc: Improved handling of 8 bit playback modes.
402 Put in mock support for SNDCTL_DSP_SETFRAGMENT.
403
b7cf6a2f
CV
404Tue Apr 24 23:51:00 2001 Corinna Vinschen <corinna@vinschen.de>
405
406 * passwd.cc (getpwnam_r): Add pw_passwd handling as well.
407 (getpwuid_r): Ditto.
408
3c73ae1c
CV
409Tue Apr 24 23:43:00 2001 Corinna Vinschen <corinna@vinschen.de>
410
411 * passwd.cc (getpwnam_r): Use correct offsets into buffer.
412 Copy pw_gecos field as well.
413 (getpwuid_r): Ditto.
414
8db71e01
ED
4152001-04-24 Egor Duda <deo@logos-m.ru>
416
417 * dlmalloc.c: New file. Port of Doug Lea's malloc
418 * dlmalloc.h: Ditto.
419 * Makefile.in: Add support for MALLOC_DEBUG
420 * config.h.in: Ditto.
421 * winsup.h: Ditto.
422 * configure.in: Add --enable-malloc-debugging option.
423 * configure: Regenerate.
424 * debug.h: Include declarations for debugging malloc.
425 * tty.cc (grantpt): Fix definition.
426 (unlockpt): Ditto.
427
f3ea62a8
CF
428Mon Apr 23 22:00:29 2001 Christopher Faylor <cgf@cygnus.com>
429
430 Remove trailing underscore from fhandler_base and friends, throughout.
431 * fhandler.h (fhandler_base::set_open_status): New method. Stores
432 original open status.
433 (fhandler_base::get_open_status): New method. Retrieves original open
434 status.
435 (fhandler_base::reset_to_open_binmode): New method.
436 * fhandler.cc (fhandler_base::open): Save open status.
437 (fhandler_base::init): Ditto.
438 * fhandler_clipboard.cc (fhandler_clipboard::open): Ditto.
439 * fhandler_console.cc (fhandler_console::open): Ditto.
440 * fhandler_dsp.cc (fhandler_dsp::open): Ditto.
441 * fhandler_dev_mem.cc (fhandler_dev_mem::open): Ditto.
442 * fhandler_dev_random.cc (fhandler_dev_random::open): Ditto.
443 * fhandler_serial.cc (fhandler_serial::open): Ditto.
444 * fhandler_tty_slave.cc (fhandler_tty_slave::open): Ditto.
445 * fhandler_tty_master.cc (fhandler_tty_master::open): Ditto.
446 * fhandler_dev_zero.cc (fhandler_dev_zero::open): Ditto.
447 * syscalls.cc (setmode): Rework so that 0 mode value causes reversion
448 to open state.
449
450 * fhandler_tty_slave.cc (fhandler_tty_slave::read): Use correct
451 multiplier when converting from deciseconds to milliseconds.
452
9cf9c146
CF
453Mon Apr 23 13:28:35 2001 Christopher Faylor <cgf@cygnus.com>
454
455 * fhandler.h (fhandler_base::clear_r_binary): New method.
456 (fhandler_base::clear_w_binary): New method.
457 * syscalls.cc (setmode): Accept 0 as mode value. Resets text/binary
458 behavior for fd to default.
459
f940c5b1
CF
460Mon Apr 23 12:46:07 2001 Christopher Faylor <cgf@cygnus.com>
461
462 * net.cc [errmap]: Add '0' condition.
463 (find_winsock_errno): Don't translate no error to EPERM.
464
c02e9189
CF
465Sun Apr 22 20:48:24 2001 Christopher Faylor <cgf@cygnus.com>
466
467 * include/cygwin/version.h: Bump Cygwin version and API version.
468
9672024b
RC
469Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com>
470
471 * thread.cc (MTinterface::Init): Always initialise per process variables.
472
1acf5c29
CF
473Sun Apr 22 19:18:18 2001 Christopher Faylor <cgf@cygnus.com>
474
475 * features.h: Reinstate as wrapper for sys/features.h.
476
b2652452
CV
477Mon Apr 23 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
478
479 * security.cc (alloc_sd): Reformat comment.
480 * shared.cc: Drop function declarations already in security.h.
481
96dc5dd7
CF
482Sun Apr 22 12:17:57 2001 Christopher Faylor <cgf@cygnus.com>
483
484 * shortcut.c (check_shortcut): Close input file handle before
485 returning.
486 * path.cc (check_sysfile): Ditto.
487 (symlink_info::check): Rely on opened file handle being closed by
488 symlink checking routines. Set ext_tacked_on when .lnk is detected.
489
da77d416
CF
490Sat Apr 21 19:26:05 2001 Christopher Faylor <cgf@cygnus.com>
491
492 * thread.cc (MTinterface::Init): Remove accidentally checked in code.
493
9450ad0d
RC
494Sun Apr 22 00:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
495
496 * passwd.cc (getpwuid): Check for thread cancellation.
497 (getpwuid_r): Ditto.
498 (getpwname): Ditto.
499 (getpwnam_r): Ditto.
500 * thread.h (pthread_mutex): New constructors for pshared operation.
501 (MTinterface): Associative array for pshared mutex's.
502 * thread.cc (MTinterface::Init): Initailize pshared mutex array.
503 (pthread_cond::BroadCast): Implementation notes.
504 (pthread_cond::TimedWait): Remove use of SignalObjectAndWait on non-NT systems.
505 (pthread_mutex::pthread_mutex(unsigned short)): New function.
506 (pthread_mutex::pthread_mutex (pthread_mutex_t *, pthread_mutexattr *)):New function.
507 (pthread_mutex::pthread_mutex(pthread_mutexattr *)): Fail on pshared mutex's.
508 (__pthread_mutex_getpshared): New function.
509 (__pthread_join): Check for thread cancellation.
510 (__pthread_cond_timedwait): Support pshared mutex's.
511 (__pthread_cond_wait): Ditto.
512 (__pthread_condattr_setpshared): Error on PROCESS_SHARED requests.
513 (__pthread_mutex_init): Support pshared mutex's.
514 (__pthread_mutex_getprioceiling): Ditto.
515 (__pthread_mutex_lock): Ditto.
516 (__pthread_mutex_trylock): Ditto.
517 (__pthread_mutex_unlock): Ditto.
518 (__pthread_mutex_destroy): Ditto.
519 (__pthread_mutex_setprioceiling): Ditto.
520 (__pthread_mutexattr_setpshared): Support PTHREAD_PROCESS_PSHARED requests.
521
60326076
CF
522Fri Apr 20 19:38:29 2001 Christopher Faylor <cgf@cygnus.com>
523
524 * cygwin.din: Add *scanf and *scan_r functions.
525
3c8e92d9
CV
526Fri Apr 20 22:25:00 2001 Corinna Vinschen <corinna@vinschen.de>
527
528 * security.cc (set_process_privileges): Swap out.
529 * sec_helper.cc (set_process_privilege): Rename from
530 `set_process_privileges'. Takes the privilege to enable or disable
531 as parameter now.
532 * security.h: Add prototype for `set_process_privileges'.
533
b9815dc3
CF
5342001-04-19 Egor Duda <deo@logos-m.ru>
535
536 * path.cc (path_conv::check): Always initialize member variables.
537
cbd88687
CF
538Fri Apr 20 12:27:49 2001 Christopher Faylor <cgf@cygnus.com>
539
540 * include/sys/file.h: More cleanup for X_OK.
541
cdcfe4e8
CF
542Fri Apr 20 11:48:45 2001 Christopher Faylor <cgf@cygnus.com>
543
544 * include/sys/file.h: Move X_OK protection earlier.
545
546 * dtable.cc (dtable::vfork_child_fixup): Avoid closing already closed
547 handles.
548
bfbc1aec
CV
549Fri Apr 20 16:29:00 2001 Corinna Vinschen <corinna@vinschen.de>
550
551 * grp.cc (getgroups): Change so that SIDs get compared instead
552 of strings to SIDs.
553
c0d1968a
CV
554Fri Apr 20 14:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
555
556 * Makefile.in: Add object files `sec_helper.cc' and `sec_acl.cc'.
557 * security.cc: Swap out several functions.
558 * sec_acl.cc: New file. Move Sun compatibel ACL functions from
559 `security.cc' to here.
560 * sec_helper.cc: New file. Move security helper functions from
561 `security.cc' to here.
562 * security.h: Changed to accomodate the above changes.
563
564Fri Apr 20 14:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
565
566 * grp.cc: Replace `group_in_memory_p' by `group_state'.
567 Eliminate group_sem throughout.
568 (enum grp_state): New enumeration type.
569 (read_etc_group): Make race safe.
570 * security.cc: Eliminate group_sem throughout.
571
b78d6f6e
CV
572Thu Apr 19 9:40:00 2001 Corinna Vinschen <corinna@vinschen.de>
573
574 * mmap.cc (mmap): Drop usage of the same memory area if the same
575 region of the same file is mapped twice.
576
0381fec6
CF
577Wed Apr 18 16:53:54 2001 Christopher Faylor <cgf@cygnus.com>
578
579 Throughout, change fdtab references to cygheap->fdtab.
580 * child_info.h (cygheap_exec_info): Eliminate special fdtab stuff.
581 * spawn.cc (spawn_guts): Ditto.
582 * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate.
583 * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap.
584 (_cmalloc_entry): Include fdtab here.
585 * dtable.h (dtable): Declare/define new methods.
586 * dtable.cc (dtable::vfork_child_fixup): New method.
587 (dtable::fixup_after_exec): Remove unneeded extra arguments.
588 * dcrt0.cc (dll_crt0_1): Ditto.
589
590 * environ.cc (getwinenv): Use case sensitive comparison.
591 (winenv): Make a copy of environment cache to avoid realloc problems
592 when duplicate environment variables exist in the environment. (From
593 Egor Duda)
594
595 * net.cc (cygwin_socket): Revert Apr 14 change.
596
597 * include/sys/file.h: Protect against previous X_OK definition.
598
599Tue Apr 17 12:18:28 2001 Christopher Faylor <cgf@cygnus.com>
600
601 * passwd.cc: Eliminate passwd_sem throughout.
602 * security.cc: Ditto.
603
604Tue Apr 17 12:18:28 2001 Robert Collins <rbtcollins@hotmail.com>
605
606 * cygwin.din: Export New functions.
607 * passwd.cc (read_etc_passwd): Make race safe.
608 (getpwuid_r): New function.
609 (getpwnam_r): New function.
610
77c45b12
CV
6112001-04-18 Egor Duda <deo@logos-m.ru>
612
613 * grp.cc (getgroups): Avoid crash if passwd field if /etc/group is
614 empty.
615
4199e1e6
CF
616Tue Apr 17 19:05:44 2001 Christopher Faylor <cgf@cygnus.com>
617
618 * path.h (path_conv::add_ext_from_sym): Declare.
619 * path.cc (path_conv::add_ext_from_sym): Convert to pure inline method.
620
e6629a8a
CV
621Tue Apr 17 18:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
622
623 * path.cc (windows_device_names): Add missing NULL element.
624
adfd477d
CF
625Tue Apr 17 12:14:54 2001 Christopher Faylor <cgf@cygnus.com>
626
627 * path.cc (windows_device_names): Move dsp to proper location.
628
8aefe7c0
CV
629Tue Apr 17 13:44:00 2001 Corinna Vinschen <corinna@vinschen.de>
630
631 * path.cc (path_conv::check): Set case_clash even if pcheck_case
632 is set to PCHECK_ADJUST when a case clash is given for the last
633 component in path.
634 (symlink_info::case_check): Ditto.
635 * syscalls.cc (_rename): Avoid overwriting an already existing file
636 if a case clash is given even if pcheck_case is set to PCHECK_ADJUST.
637
77eb506d
CV
638Tue Apr 17 2:07:07 2001 Christopher Faylor <cgf@cygnus.com>
639
640 * config.h.in: Turn off VFORK again.
641
431ba7dd
CF
642Mon Apr 16 23:45:24 2001 Christopher Faylor <cgf@cygnus.com>
643
644 * path.h (cwdstuff): Move class.
645 * cygheap.h (cwdstuff): To here.
646 (init_cygheap): Add cwd field.
647 * child_info.h (cygheap_exec_info): Eliminate cwd stuff.
648 (child_info_spawn): Ditto.
649 * dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call. Convert
650 cygcwd reference to cygheap->cwd.
651 * path.cc: Ditto, throughout.
652 (cwdstuff::copy): Eliminate.
653 (cwdstuff::fixup_after_exec): Ditto.
654 * spawn.cc (spawn_guts): Eliminate call to cygcwd.copy.
655
656 * fhandler.h (FH_OSS_DSP): Move into "fast" device category.
657
7ade56ca
CV
658Mon Apr 16 19:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
659
660 * mmap.cc: Move fh_paging_file from some functions to be
661 a global static variable.
662 (class mmap_record): Add `devtype_' member to remember
663 the device type of the file. Add declaration for methods
664 `get_device', `alloc_fh' and `free_fh'.
665 (mmap_record::mmap_record): Initialize `devtype_' correctly.
666 (mmap_record::alloc_fh): New method.
667 (mmap_record::free_fh): Ditto.
668 (munmap): Use new mmap_record::alloc_fh and mmap_record::free_fh
669 methods to create a correct fhandler.
670 (msync): Ditto.
671 (fixup_mmaps_after_fork): Ditto.
672
c4548fb4
CV
673Mon Apr 16 16:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
674
675 * grp.cc (getgroups): If `allow_ntsec' is set, use the process token
676 information to evaluate the groups list.
677
3b3b19d2
CF
678Mon Apr 16 00:08:02 2001 Christopher Faylor <cgf@cygnus.com>
679
680 * features.h: Remove this file as it is now being supplied by newlib.
681
b0a50cf3
CF
682Sun Apr 15 23:23:29 2001 Christopher Faylor <cgf@cygnus.com>
683
684 * autoload.cc: Add winmm functions needed by fhandler_dsp.cc.
685
686Sun Apr 15 22:53:52 2001 Andy Younger <andylyounger@hotmail.com>
687
688 * fhandler_dsp.cc: New file. Implements OSS like /dev/dsp.
689 * include/sys/soundcard.h: New file. User land includes for OSS
690 /dev/dsp.
691 * fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP
692 definition.
693 * dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp
694 device.
695 * path.cc (windows_device_names): Add /dev/dsp into list of device
696 names.
697 * Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
698
4535e6a9
CF
699Sun Apr 15 16:36:27 2001 Christopher Faylor <cgf@cygnus.com>
700
701 * uname.c (uname): Default n in in86 to 6 if Windows returns > 6.
702
1ff87985
CV
703Sun Apr 15 15:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
704
705 * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
706 (add_ext_from_sym_): New inline function.
707
34bbe838
CF
708Sat Apr 14 19:23:52 2001 Christopher Faylor <cgf@cygnus.com>
709
710 * config.h.in: Turn on VFORK by default.
711
266be1d8
CF
712Sat Apr 14 18:04:35 2001 Christopher Faylor <cgf@cygnus.com>
713
714 * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX
715 domain sockets will not stay around.
716
717Sat Apr 14 18:01:43 2001 Pierre A. Humblet <Pierre.Humblet@ieee.org>
718
719 * select.cc (socket_cleanup): Set SO_LINGER to small value so closed
720 dummy sockets do not stay around. Use correct value for second argument
721 to shutdown.
722
e6b98fc8
RC
723Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>
724
725 * thread.h (MTinterface): Add threadcount.
726 * thread.cc (MTinterface::Init): Set threadcount to 1.
727 (__pthread_create): Increment threadcount.
728 (__pthread_exit): Decrement threadcount and call exit() from the last thread.
729
1114d472 730Fri Apr 13 11:34:24 2001 Robert Collins <rbtcollins@hotmail.com>
39b6859a
CF
731
732 * fork.cc (fork_child): Call the __pthread_atforkchild function.
733 (fork_parent): Call the __pthread_atforkparent function.
734 * cygwin.din: Export pthread_atfork.
735 * thread.h (callback): New class.
736 (MTinterface): Use it.
737 * thread.cc (__pthread_atforkprepare): New function.
738 (__pthread_atforkparent): New function.
739 (__pthread_atforkchild): New function.
740 (__pthread_atfork): New function.
741 * pthread.cc (pthread_atfork): New function.
742
e61cead3
CV
743Fri Apr 13 9:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
744
745 * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
746 (path_conv::check): Use add_ext_from_sym throughout.
747
748Thu Apr 12 23:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
70c370d6
CV
749
750 * dir.cc (mkdir): Check for case clash.
751 * environ.cc: Add extern declaration for `pcheck_case'.
752 (check_case_init): New function.
753 (struct parse_thing): Add "check_case" option.
754 * errno.cc (_sys_nerrlist): Add text for ECASECLASH.
755 (strerror): Add case branch for ECASECLASH.
756 * fhandler.cc (fhandler_disk_file::open): Check for case clash.
757 * path.cc: Add global variable `pcheck_case'.
758 (struct symlink_info): Add member `case_clash' and method `case_check'.
759 (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'.
760 (pathnmatch): New funtion.
761 (pathmatch): Ditto.
762 (path_conv::check): Add handling for case checking.
763 (symlink): Check for case clash.
764 (symlink_info::check): Add parameter for case checking.
765 Handle case checking.
766 (symlink_info::case_check): New method.
767 (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT.
768 * path.h: Add extern declarations for `pathmatch' and
769 `pathnmatch'.
770 (enum case_checking): New enumeration type describing
771 the case checking behaviour of path conversion routines.
772 (class path_conv): Add member `case_clash'.
773 * syscalls.cc (_link): Check for case clash.
774
82d4a5d4
CF
775Thu Apr 12 12:49:53 2001 Christopher Faylor <cgf@cygnus.com>
776
777 * syscalls.cc (mkfifo): New function stub.
778
aa67fd12
CF
7792001-04-12 Robert Collins <rbtcollins@hotmail.com>
780
781 * configure.in: Remove PTH_ALLOW.
782 * cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add
783 new pthread exports.
784 * pthread.cc: New wrapper functions for the above new exports.
785 * sched.cc (valid_sched_parameters): New function.
786 (sched_setparam): Use it.
787 (sched_set_thread_priority): New function. Used by pthread_sched*.
788 * thread.cc (pthread_key_destructor::InsertAfter): New function.
789 (pthread_key_destructor::UnlinkNext): New function.
790 (pthread_key_destructor::Next): New function.
791 (pthread_key_destructor_list::Insert): New function.
792 (pthread_key_destructor_list::Remove): New function.
793 (pthread_key_destructor_list::Pop): New function.
794 (pthread_key_destructor::pthread_key_destructor): New function.
795 (pthread_key_destructor_list::IterateNull): New function.
796 (MTinterface::Init): Initialise new member.
797 (pthread::pthread): Initialise new members.
798 (pthread::create): Copy new attributes. Set the new thread priority.
799 (pthread_attr::pthread_attr): Initialise new members.
800 (pthread_key::pthread_key): Setup destructor function.
801 (pthread_key::~pthread_key): Remove destructor function.
802 (pthread_mutexattr::pthread_mutexattr): New function.
803 (pthread_mutexattr::~pthread_mutexattr): New function.
804 (__pthread_once): New function.
805 (__pthread_cleanup): New function.
806 (__pthread_cancel): New function.
807 (__pthread_setcancelstate): New function.
808 (__pthread_setcanceltype): New function.
809 (__pthread_testcancel): New function.
810 (__pthread_attr_getinheritsched): New function.
811 (__pthread_attr_getschedparam): New function.
812 (__pthread_attr_getschedpolicy): New function.
813 (__pthread_attr_getscope): New function.
814 (__pthread_attr_setinheritsched): New function.
815 (__pthread_attr_setschedparam): New function.
816 (__pthread_attr_setschedpolicy): New function.
817 (__pthread_attr_setscope): New function.
818 (__pthread_exit): Call any key destructors on thread exit.
819 (__pthread_join): Use the embedded attr values.
820 (__pthread_detach): Use the embedded attr values.
821 (__pthread_getconcurrency): New function.
822 (__pthread_getschedparam): New function.
823 (__pthread_key_create): Pass the destructor on object creation.
824 (__pthread_key_delete): Correct incorrect prototype.
825 (__pthread_setconcurrency): New function.
826 (__pthread_setschedparam): New function.
827 (__pthread_cond_timedwait): Support static mutex initialisers.
828 (__pthread_cond_wait): Ditto.
829 (__pthread_mutex_getprioceiling): New function.
830 (__pthread_mutex_lock): Support static mutex initialisers.
831 (__pthread_mutex_trylock): Ditto.
832 (__pthread_mutex_unlock): Ditto.
833 (__pthread_mutex_destroy): Ditto.
834 (__pthread_mutex_setprioceiling): New function.
835 (__pthread_mutexattr_getprotocol): New function.
836 (__pthread_mutexattr_getpshared): New function.
837 (__pthread_mutexattr_gettype): New function.
838 (__pthread_mutexattr_init): New function.
839 (__pthread_mutexattr_destroy): New function.
840 (__pthread_mutexattr_setprotocol): New function.
841 (__pthread_mutexattr_setprioceiling): New function.
842 (__pthread_mutexattr_getprioceiling): New function.
843 (__pthread_mutexattr_setpshared): New function.
844 (__pthread_mutexattr_settype): New function. Remove stubs for non
845 MT_SAFE compilation.
846 * thread.h: Remove duplicate #defines. Add prototypes for new
847 functions in thread.cc.
848 (pthread_key_destructor): New class.
849 (pthread_key_destructor_list): New class.
850 (pthread_attr): Add new members.
851 (pthread): Remove members that are duplicated in the pthread_attr
852 class.
853 (pthread_mutex_attr): Add new members.
854 (pthread_once): New class.
855 * include/pthread.h: Add prototypes for new functions exported from
856 cygwin1.dll. Remove typedefs.
857 * include/sched.h: Add prototypes for new functions in sched.cc.
858 * include/cygwin/types.h: Add typedefs from pthread.h
859
fc672fb2
CF
860Tue Apr 10 22:02:53 2001 Christopher Faylor <cgf@cygnus.com>
861
862 * path.cc (struct symlink_info): Add extn and ext_tacked_on fields.
863 (path_conv::check): Only tack on extension if a known one didn't
864 already exist.
865 (suffix_scan::has): Return pointer to known extension.
866 (symlink_info::check): Record location of extension, if any.
867
619f7fa0
ED
8682001-04-09 Egor Duda <deo@logos-m.ru>
869
870 * fhandler.h (class fhandler_socket): Add members and methods to
871 support secure connections on AF_UNIX sockets.
872 * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method.
873 (fhandler_socket::get_connect_secret): Ditto.
874 (fhandler_socket::create_secret_event): Ditto.
875 (fhandler_socket::close_secret_event): Ditto.
876 (fhandler_socket::check_peer_secret_event): Ditto.
877 (fhandler_socket::fixup_after_fork): Duplicate secret event to child.
878 (fhandler_socket::dup): Copy address family.
879 (fhandler_socket::close): Close secret event.
880 * net.cc (get_inet_addr): Read secret cookie.
881 (cygwin_connect): Check if peer knows secret cookie value.
882 (cygwin_accept): Ditto. Copy address family to newly created socket.
883 (cygwin_bind): Generate and write secret cookie.
884 (wsock_init): Initialize random number generator.
885
aa970c61
CF
886Sun Apr 8 20:40:58 2001 Christopher Faylor <cgf@cygnus.com>
887
888 * Makefile.in: Put -lgcc last in list of libraries, since stdc++
889 library needs it.
890 * cygwin.din: Remove obsolete "__empty" export.
891 * exceptions.cc (call_signal_handler_now): Force inclusion of function
892 even when -finline-functions is specified.
893 * sigproc.h: Remove obsolete call_signal_handler declaration.
894
895Sun Apr 8 20:36:55 2001 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>
e3eef4d0 896
aa970c61
CF
897 * fhandler_console.cc (cp_get_internal): New function.
898 (cp_convert): New function.
899 (con_to_str): New function.
900 (str_to_con): New function.
901 (fhandler_console::read): Replace OemToCharBuff with con_to_str.
902 (fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
903
9ddfe5a0
CV
904Thu Apr 5 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
905
906 * syscalls.cc (stat_worker): Fix conditional which still allowed
907 successful stat'ing of non-existant files.
908
0403bb74
CF
909Wed Apr 4 10:37:44 2001 Christopher Faylor <cgf@cygnus.com>
910
911 * child_info.h: Bump magic number for fork/exec/spawn.
912
c196a1a2
CV
913Tue Apr 3 20:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
914
915 * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO.
916
c90e420d
CF
917Mon Apr 2 22:48:58 2001 Christopher Faylor <cgf@cygnus.com>
918
919 * cygrun.c (main): Fix compiler warning.
920 * gmon.c (_mcleanup): Ditto.
921 * profil.c (profile_off): Ditto.
922
923 * net.cc (find_winsock_errno): New function.
924 (__set_winsock_errno): Use find_winsock_errno.
925 (cygwin_setsockopt): Detect SO_ERROR for debugging.
926 (cygwin_getsockopt): Ditto. Translate error when getsockopt returns
927 SO_ERROR.
928 * winsup.h: regparmize __set_winsock_errno.
929 * include/sys/strace.h: Document that strace functions can't use
930 regparm.
931
0f0a7dc9
CV
9322001-04-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
933
934 * fhandler.cc (fhandler_disk_file::open): Avoid checking a magic
935 number of a directory.
936
f97adf98
CF
937Mon Apr 2 00:24:08 2001 Christopher Faylor <cgf@cygnus.com>
938
939 * shared_info.h (mount_info): Remove mnt_ elements.
940 * thread.h (struct _winsup_t): Add mnt_ elements.
941 * path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
942
1ba3935d
CF
943Sun Apr 1 20:10:34 2001 Christopher Faylor <cgf@cygnus.com>
944
945 * exceptions.cc (sigframe::call_signal_handler): Return value of
946 call_signal_handler_now.
947 * sigproc.h (sigframe): Use constructor.
948 * syscalls.cc (_read): Correct errno test prior to calling signal
949 handler.
950
2a1743c7
CF
951Sun Apr 1 00:38:06 2001 Christopher Faylor <cgf@cygnus.com>
952
0ef785e4 953 * exceptions.cc (sigframe::call_signal_handler): Move outside of "C"
2a1743c7
CF
954 block or some compilers will complain.
955
11f3a79b
CF
956Sun Apr 1 00:24:14 2001 Christopher Faylor <cgf@cygnus.com>
957
958 * exceptions.cc (call_signal_handler_now): Rename from
959 call_signal_handler to avoid C++ confusion.
960
5817ee2d
CF
961Sun Apr 1 00:08:15 2001 Christopher Faylor <cgf@cygnus.com>
962
963 * path.cc (fillout_mntent): Always remove drive root directories from
964 future consideration by "/cygdrive" reporting.
965 (cygdrive_getmnt): Avoid reporting removable drives or drives with no
966 media mounted.
967
f2aeff27
CF
968Sat Mar 31 21:56:19 2001 Christopher Faylor <cgf@cygnus.com>
969
970 * thread.h (struct _winsup_t): Remove obsolete elements. Add
971 available_drives element.
972 * path.cc (mount_info::getmntent): Report "/cygdrive" drives when
973 mounted drives are exhausted.
974 (fillout_mntent): New function.
975 (mount_item::getmntent): Use fillout_mntent.
976 (cygdrives_mntent): New function. Returns next available "/cygdrive".
977 (setmntent): Initialize available "/cygdrives".
978 * syscalls.cc: Remove some if 0'ed code.
979 * times.cc (timezone): Use more descriptive variable name.
980
f6111483
CF
981Sat Mar 31 18:59:52 2001 Christopher Faylor <cgf@cygnus.com>
982
983 * sigproc.h (class sigframe): Implement 'unregister()' method.
984 (sigframe::~sigframe): Use unregister method.
985 (sigframe::call_signal_handler): Declare new method.
986 * exceptions.cc (sigframe::call_signal_handler): New method.
987 Unregisters current sigframe before calling signal handler.
988 (setup_handler): Clear waiting threads prior to arming signal_arrived.
989 * syscalls.cc (_read): Change goto to loop. Recalculate sigframe
990 inside of loop so that constructor is called when appropriate.
991 * wait.cc (wait4): Ditto.
992
993 * signal.cc: Change "sig" to "signal" in debugging messages throughout.
994 * sigproc.cc: Ditto.
995
ab57d146
CF
996Sat Mar 31 17:12:08 2001 Christopher Faylor <cgf@cygnus.com>
997
998 * fhandler_serial.cc (fhandler_serial::raw_write): Close protected
999 handles with ForceCloseHandle or suffer spurious warnings.
1000
0cec3226
CF
1001Sat Mar 31 16:23:32 2001 Christopher Faylor <cgf@cygnus.com>
1002
1003 * fhandler.cc (fhandler_base::read): Remove special handling of CTRL-Z.
1004
70afbaae
CV
1005Sat Mar 31 11:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
1006
1007 * fhandler.h (class fhandler_console): Add members `insert_mode'.
1008 * fhandler_console.cc (fhandler_console::dup): Duplicate `insert_mode'.
1009 (fhandler_console::fhandler_console): Initialize `insert_mode'.
c796f4f1 1010 (fhandler_console::char_command): Add terminal capabilities
70afbaae
CV
1011 "enter insert mode" = \E[4h and "exit insert mode" = \E[4l.
1012 Care for insert mode on terminal capability "repeat char" = \E[x;yb.
1013 (fhandler_console::write_normal): Care for insert mode before writing
1014 to the console.
1015 (array keytable): Add keymapping for modified cursor and control
1016 block keys (xterm like).
1017
f42da31a
CV
1018Fri Mar 30 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
1019
1020 * fhandler.h (class fhandler_console): Add members `savebufsiz' and
1021 `savebuf' to allow save/restore of screen.
70afbaae
CV
1022 * fhandler_console.cc (fhandler_console::dup): Duplicate `savebufsiz'
1023 and `savebuf'.
f42da31a
CV
1024 (fhandler_console::fhandler_console): Initialize `savebufsiz' and
1025 `savebuf'.
1026 (fhandler_console::char_command): Add terminal capabilities
1027 "save screen content" = \E[?47h and "restore screen content" = \E[?47l.
1028
b5eb3d0f
CF
1029Wed Mar 28 19:28:50 2001 Christopher Faylor <cgf@cygnus.com>
1030
1031 * path.cc (chdir): Eat trailing whitespace on input path.
1032
1ac6d1a1
CF
1033Tue Mar 27 22:38:42 2001 Christopher Faylor <cgf@cygnus.com>
1034
1035 * lib/_cygwin_S_IEXEC.c: Remove "const" from globals or they never seem
1036 to be defined. Wrap definitions in extern "C". Include winsup.h to
1037 assure proper definitions.
1038
1039 * dcrt0.cc (dll_crt0_1): Call stdio_init after premain run so that
1040 binmode.o, etc., will control default stdio settings.
1041 * dtable.cc (dtable::init_std_file_from_handle): Allow __fmode to force
1042 binmode/textmode settings. Default pipes to binmode.
1043
37a2d97a
CV
1044Tue Mar 27 11:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
1045
1046 * mmap.cc (mmap): Fix conditional for previous patch.
1047
1636a5a1
CV
1048Mon Mar 26 18:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
1049
1050 * mmap.cc (mmap): Outflank copy-on-write problem on 9x by
1051 setting access mode to FILE_MAP_READ when read access is requested.
1052
aa73152e
CF
1053Sun Mar 25 20:12:21 2001 Christopher Faylor <cgf@cygnus.com>
1054
1055 * dlfcn.cc (check_access): Eliminate.
1056 (check_path_access): Use passed in path_conv buf.
1057 (get_full_path_of_dll): Use passed in name buf to avoid a static. Rip
1058 out most of the path checking since LoadLibrary will do all of this
1059 automatically.
1060 (dlopen): Set errno when appropriate (may not be compliant?).
1061 * environ.cc (posify): Don't pass in "native" path if it seems to
1062 actually be posix.
1063
db0421f6
CF
1064Thursday Mar 22 2001 Robert Collins <rbtcollins@hotmail.com>
1065
1066 * fhandler.h (fhandler_dev_clipboard): Extend to support writing.
1067 * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
1068 Initialize new fields. Open clipboard here.
1069 (fhandler_dev_clipboard::dup): New method.
1070 (fhandler_dev_clipboard::open): Accomodate new fields. Register
1071 clipboard here, if appropriate.
1072 (set_clipboard): New function. Moves buffer to clipboard.
1073 (fhandler_dev_clipboard::write): Truly implement clipboard writing.
1074 (fhandler_dev_clipboard::read): Reimplement to allow successive reads.
1075 (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard.
0ed560cb
CF
1076 (fhandler_dev_clipboard::close): Clear out new fields. Support
1077 sequential reads and sequential writes. Support for binary data via a
1078 native clipboard format.
db0421f6 1079
0b30bad4 10802001-03-22 Egor Duda <deo@logos-m.ru>
0cec3226 1081
0b30bad4
CF
1082 * fhandler_console.cc (fhandler_console::set_default_attr): Update
1083 console color attributes on tty reset.
1084
c4458148
CF
1085Wed Mar 21 22:12:36 2001 Christopher Faylor <cgf@cygnus.com>
1086
1087 * autoload.cc (kernel32_init): New function for kernel32 autoload
1088 initialization.
1089 (SignalObjectAndWait): Add conditional load of this function when it is
1090 available.
1091
9a08b2c0
CF
10922001-03-21 Robert Collins <rbtcollins@hotmail.com>
1093
1094 * sched.cc: New file. Implement sched*.
1095 * include/sched.h: New file. User land includes for sched*.
1096 * Makefile.in: Add sched.o
1097 * cygwin.din: Add exports for sched*.
1098
a1299ba5
CF
1099Tue Mar 20 14:48:46 2001 Christopher Faylor <cgf@cygnus.com>
1100
1101 * dtable.cc: Guard against new winsock.h/winsock2.h warnings when
1102 mixing winsock*.h and sys/types.h.
1103 * fhandler_socket.cc: Ditto.
1104 * net.cc: Ditto.
1105 * select.cc: Ditto.
1106 * exceptions.cc: Remove unneeded define.
1107
b8c8fa17
CF
1108Mon Mar 19 17:43:29 2001 Christopher Faylor <cgf@cygnus.com>
1109
1110 * exceptions.cc (interruptible): Update debugging output.
1111 (setup_handler): Ensure that wait_sig loop wakes up when we punt on
1112 sending a signal.
1113 * poll.cc (poll): Add signal guard here.
1114
78ace8a7
ED
11152001-03-19 Egor Duda <deo@logos-m.ru>
1116
1117 * tty.h (tty::create_inuse): Add new parameter to allow non-
1118 inheritable 'inuse' events.
1119 * tty.cc (tty::create_inuse): Use new parameter.
1120 * fhandler_tty.cc (fhandler_tty_master::init): Ditto.
1121 * fhandler_tty.cc (fhandler_pty_master::open): Ditto.
1122 * fhandler_tty.cc (fhandler_tty_master::init): Create master_alive
1123 event.
1124 * tty.cc (tty_list::terminate): Close master_alive event.
1125 * fhandler_tty.cc (fhandler_tty_common::close): Send EOF to slaves
1126 when master side is closed.
1127
98750a84
CV
1128Mon Mar 19 14:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
1129
1130 * mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
1131 file descriptor is -1.
1132
30f326bf
CV
1133Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1134
1135 * syscalls.cc (check_posix_perm): New static function.
1136 (fpathconf): Add _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
1137 support.
1138 (pathconf): Ditto.
1139 * include/cygwin/version.h: Bump API minor number to 37.
1140
5e8e21d9
ED
11412001-03-18 Egor Duda <deo@logos-m.ru>
1142
1143 * fhandler.h (fhandler_tty_slave): Declare new methods.
1144 * select.cc (fhandler_tty_slave::select_read): New method.
1145 * select.cc (fhandler_tty_slave::ready_for_read): Ditto.
1146 * select.cc (verify_tty_slave): New function.
1147 * fhandler_termios.cc (fhandler_termios::line_edit): Empty input
1148 buffer on signal.
1149 * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data
1150 after reading from pipe. Reset event if input pipe is empty.
1151 * tty.h (class tty): Allow creating events with manual reset.
1152 * tty.cc (tty::get_event): Use manual_reset flag.
1153 * tty.cc (tty::common_init): Create input_available_event with
1154 manual reset.
1155
00a74961
CF
1156Sat Mar 17 21:48:03 2001 Christopher Faylor <cgf@cygnus.com>
1157
1158 * external.cc (fillout_pinfo): Match windows pid, as well as cygwin pid
1159 when passed in pid. Don't prematurely break when searching for a pid.
1160
1161 * thread.h (_winsup_t): Eliminate unneeded field.
1162
8eb72e63
CV
1163Sat Mar 17 20:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
1164
1165 * net.cc (get_95_ifconf): Use strcasematch instead of strcasecmp.
1166 * syscalls.cc (_unlink): Ditto.
1167 (_rename): Ditto.
1168
57499703
CF
1169Sat Mar 17 12:43:15 2001 Christopher Faylor <cgf@cygnus.com>
1170
1171 * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
1172 input is "foo".
1173
298fad46
CV
1174Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
1175
1176 * net.cc (cygwin_socket): Set protocol to 0 when address family is
1177 AF_UNIX to avoid WSAEPROTONOSUPPORT error.
1178
f52488f7
CV
1179Sat Mar 17 09:51:32 2001 Mathew Brozowski <brozow@tavve.com>
1180
1181 * net.cc (cygwin_socket): Pass protocol parameter to socket call.
1182
b63a3f55
CF
1183Sat Mar 17 02:05:38 2001 Christopher Faylor <cgf@cygnus.com>
1184
1185 * dir.cc (readdir): Use strcasematch for consistency.
1186 * path.cc (symlink_info): Eliminate known_suffix.
1187 (path_conv::check): Always copy ext_here to end of buffer, if found.
1188 (suffix_scan): Eliminate ext_here, add suffixes_start.
1189 (suffix_scan::has): Eliminate an argument. Reorganize. Always return
1190 pointer to end of input path.
1191 (suffix_scan::next): Take a second pass through the suffix list looking
1192 for .lnk.
1193 (symlink_info::check): Eliminate known_suffix usage.
1194
db15b3e3 1195Sat Mar 17 00:10:52 2001 Christopher Faylor <cgf@cygnus.com>
5bb22c6b 1196
db15b3e3 1197 * syscalls.cc (stat_dev): Give devices full read/write by default.
5bb22c6b 1198
c0c9de3c
CF
1199Saturday Mar 17 3:45 2001 Robert Collins <rbtcollins@hotmail.com>
1200
1201 * thread.cc (MTinterface::CreateCond): Check for null attr pointer.
1202
ddca580f
CF
1203Fri Mar 16 21:13:23 2001 Christopher Faylor <cgf@cygnus.com>
1204
1205 * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input
1206 when a signal is sent or we'll end up in an EOF/signal race.
1207
b65c6896
CF
1208Fri Mar 16 20:25:40 2001 Christopher Faylor <cgf@cygnus.com>
1209
1210 * path.cc: Translate scan states from defines to enums.
1211 (suffix_scan): Rename state to nextstate for clarity.
1212 (lnk_match): Change to allow multiple states to indicate that a .lnk
1213 has been matched.
1214 (suffix_scan::has): Eliminate a goto. Handle .lnk as a special case,
1215 since a .lnk may also need to be tacked on the end of a .lnk.
1216 (suffix_scan::next): Don't increment next state. Set it specifically.
1217 Recognize new .lnk states.
1218
92f4bf97 1219Saturday Mar 17 01:19 2001 Robert Collins rbtcollins@hotmail.com
0cec3226 1220
5ccbf4b6
CF
1221 * cygwin.din: Export the new functions.
1222 * pthread.cc (pthread_cond_*): Add wrapper functions that call
1223 __pthread_cond* functions.
1224 * thread.cc (__pthread_cond_*): Implement the pthread_cond* functions.
1225 * thread.h: Add new class entries and prototypes for __pthread_cond*
1226 functions.
1227 * include/pthread.h: user land header prototypes for pthread_cond*
1228 functions and related defines.
1229
e212576d
CV
1230Wed Mar 14 16:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1231
1232 * environ.cc (parse_options): Use strtok_r instead of strtok.
1233 * security.cc (convert_string_sid_to_sid): Ditto.
1234 (aclfromtext): Ditto. Fix buffer usage.
1235
78d2c08c
CV
1236Wed Mar 14 10:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
1237
1238 * path.cc (lnk_suffixes): Remove.
1239 (class suffix_scan): Add `lnk_state' flag.
1240 (suffix_scan::lnk_match): Return state of `lnk_state' now.
1241 (suffix_scan::has): Changed behaviour if file has `.lnk' suffix.
1242 (suffix_scan::next): Set `lnk_state' where appropriate.
1243 (symlink_info::check): Fix a wrong `break'.
1244 * syscalls.cc (chown_worker): Change debug statement to reflect
1245 lchown fix.
1246 (lchown): Call chown_worker with `PC_SYM_NOFOLLOW' instead of
1247 `PC_SYM_IGNORE'.
1248
1d39c83a
CV
1249Tue Mar 13 13:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
1250
1251 * fhandler.cc (fhandler_disk_file::fstat): Add correct modes to
1252 symlinks when stat'ing on FAT or FAT32 file systems.
1253
e935fcf0
ED
12542001-03-12 Egor Duda <deo@logos-m.ru>
1255
1256 * fhandler.h (fhandler_termios::fixup_after_exec): New function.
344ce60c
ED
1257 * fhandler_termios.cc (fhandler_termios::fixup_after_fork): New
1258 function. Fixup output handle.
e935fcf0
ED
1259 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output
1260 handle is now fixed up in fhandler_termios::fixup_after_fork().
1261
79409dc0
ED
12622001-03-12 Egor Duda <deo@logos-m.ru>
1263
1264 * fhandler.h (fhandler_termios::fhandler_termios): Enable fixup
1265 after fork.
1266 * fhandler_console.cc (fhandler_console::fhandler_console): Fixup
1267 after fork is now enabled in the base class constructor.
1268
2b777e2e
CF
1269Mon Mar 12 11:19:41 2001 Christopher Faylor <cgf@cygnus.com>
1270
1271 * mkvers.sh: Include config.h so that DEBUGGING is correctly defined.
1272
941fa5ad
CF
1273Mon Mar 12 09:47:55 2001 Christopher Faylor <cgf@cygnus.com>
1274
1275 * spawn.cc (spawn_guts): Don't set EXIT_REPARENTING if parent process
1276 is not a cygwin process (suggested by Jason Gouger
1277 <cygwin@jason-gouger.com>).
1278
d0909d91
CF
1279Sun Mar 11 16:00:58 2001 Christopher Faylor <cgf@cygnus.com>
1280
1281 * child_info.h: Bump magic number for fork/exec/spawn.
1282
2116a175
CF
1283Sat Mar 10 20:54:47 2001 Christopher Faylor <cgf@cygnus.com>
1284
1285 * autoload.cc (noload): Use proper method for multiline strings or
1286 newer gcc's complain.
1287 * exceptions.cc (unused_sig_wrapper): Ditto.
1288 * fhandler.h (fhandler_base): Make get_io_handle and friends return
1289 self.
1290 * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accomodate
1291 DEBUGGING flag to avoid spurious warnings when inheritance is set.
1292
7cf3b655
CF
1293Sat Mar 10 16:52:12 2001 Christopher Faylor <cgf@cygnus.com>
1294
1295 * shortcut.c (PATH_ALL_EXEC): Add parentheses to avoid a compiler
1296 warning.
1297
1298 * exceptions.cc (setup_handler): Clarify debugging message.
1299 * sigproc.cc (proc_subproc): Remove PROC_CHILDSTOPPED test. It is
1300 handled by normal PROC_CLEARWAIT case.
1301 (wait_sig): Eliminate "dispatched" tracking. Remove __SIGCHILDSTOPPED
1302 test. Decrement counter again before jumping out of
1303 InterlockedDecrement loop so that subsequent InterlockedIncrement will
1304 keep the counter at the correctly decremented value and also detect
1305 when there are pending signals.
1306 * sigproc.h: Remove __SIGCHILDSTOPPED element.
1307 (procstuff): Remove PROC_CHILDSTOPPED element.
1308
e2f2a27e
CF
1309Sat Mar 10 15:22:44 2001 Christopher Faylor <cgf@cygnus.com>
1310
1311 * syscalls.cc (_rename): Set errno to ENOENT when an old path doesn't
1312 exist (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>). Also set EACCES
1313 when directory is not writable.
1314
6ebccdc1
CF
1315Wed Mar 7 15:49:47 2001 Christopher Faylor <cgf@cygnus.com>
1316
1317 * syscalls.cc (_read): Change definition to return ssize_t to be
1318 consistent with read.
1319 (_write): Change definition to return ssize_t to be consistent with
1320 write.
1321
efd76e41
CF
1322Wed Mar 7 01:08:21 2001 Christopher Faylor <cgf@cygnus.com>
1323
1324 * sigproc.h (sigthread): Declare new methods. Create new winapi_lock
1325 field.
1326 (sigframe:;set): Call get_winapi_lock after frame is set so that signal
1327 handler thread knows not to call SuspendThread.
1328 (sigframe::~sigframe): Release winapi_lock.
1329 * exceptions.cc (sigthread::get_winapi_lock): New method.
1330 (sigthread::release_winapi_lock): New method.
1331 (setup_handler): Use get_winapi_lock to ensure that signalled thread is
1332 not blocked in a Windows API.
1333
1334 * path.h (path_types): Avoid broken GCC warning.
1335
bf11a54f
CV
1336Tue Mar 6 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
1337
1338 * path.cc (suffix_scan::has): Change order of conditionals
1339 to allow checking for .lnk suffixes even if in_suffixes is empty.
1340
1341Tue Mar 6 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
7cdc9fee
CV
1342
1343 * autoload.c (cygwin_premain0): Add missing parameter.
1344 * binmode.c (cygwin_premain0): Ditto.
1345 * textmode.c (cygwin_premain0): Ditto.
1346
1347Tue Mar 6 12:04:00 2001 Jason Tiller <jtiller@sjm.com>
1348
1349 * auto_load.cc: Add "GetKeyboardLayout" entry in the list of
1350 Win32 User32.DLL exports to provide.
1351 * fhandler.h (class fhandler_console): Add meta_mask private
1352 member to remember which keystroke modifiers should generate
1353 META.
1354 * fhandler_console.cc (fhandler_console::read): Modify code that
1355 tests a keystroke for a META-escaped key to use the 'meta_mask'
1356 variable.
1357 (fhandler_console::fhandler_console): Add definition for
1358 variable "meta_mask" used to determine if a keystroke should be
1359 preceded by META in the client console stream. Set meta_mask
1360 based on whether or not user's keyboard language is English -
1361 non-English keyboards pass AltGr (right <ALT>) unmolested,
1362 whereas English keyboards now interpret left- and right-<ALT>
1363 as META.
1364
a887211b
CV
1365Mon Mar 5 20:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
1366
1367 * include/a.out.h: Add copyright hint.
1368 * include/fcntl.h: Ditto.
1369 * include/lastlog.h: Ditto.
1370 * include/memory.h: Ditto.
1371 * include/mntent.h: Ditto.
1372 * include/paths.h: Ditto.
1373 * include/poll.h: Ditto.
1374 * include/syslog.h: Ditto.
1375 * include/termio.h: Ditto.
1376 * include/tzfile.h: Ditto.
1377 * include/arpa/inet.h: Ditto.
1378 * include/asm/byteorder.h: Ditto.
1379 * include/asm/socket.h: Ditto.
1380 * include/asm/types.h: Ditto.
1381 * include/cygwin/if.h: Ditto.
1382 * include/cygwin/mtio.h: Ditto.
1383 * include/cygwin/rdevio.h: Ditto.
1384 * include/cygwin/socket.h: Ditto.
1385 * include/net/if.h: Ditto.
1386 * include/netinet/in.h: Ditto.
1387 * include/netinet/in_systm.h: Ditto.
1388 * include/netinet/ip.h: Ditto.
1389 * include/netinet/ip_icmp.h: Ditto.
1390 * include/netinet/tcp.h: Ditto.
1391 * include/sys/cdefs.h: Ditto.
1392 * include/sys/cygwin.h: Ditto.
1393 * include/sys/ioctl.h: Ditto.
1394 * include/sys/mman.h: Ditto.
1395 * include/sys/mount.h: Ditto.
1396 * include/sys/mtio.h: Ditto.
1397 * include/sys/procfs.h: Ditto.
1398 * include/sys/resource.h: Ditto.
1399 * include/sys/smallprint.h: Ditto.
1400 * include/sys/socket.h: Ditto.
1401 * include/sys/strace.h: Ditto.
1402 * include/sys/syslog.h: Ditto.
1403 * include/sys/sysmacros.h: Ditto.
1404 * include/sys/termio.h: Ditto.
1405 * include/sys/termios.h: Ditto.
1406 * include/sys/uio.h: Ditto.
1407 * include/sys/un.h: Ditto.
1408 * include/sys/utsname.h: Ditto.
1409 * include/sys/vfs.h: Ditto.
1410 * include/sys/wait.h: Ditto.
1411 * regexp/regerror.c: Ditto.
1412 * regexp/regexp.h: Ditto.
1413 * regexp/regmagic.h: Ditto.
1414
95a8465b
CF
1415Mon Mar 5 01:25:03 2001 Christopher Faylor <cgf@cygnus.com>
1416
1417 * dlopen.c (dlopen): Return NULL when name is NULL (suggested by
1418 chrisiasci@aol.com).
1419
1420 * cygwin.din: Add a new, internally used export -
1421 _check_for_executable.
1422 * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries.
1423 Pass user_data to premain functions.
1424 * fhandler.cc (fhandler_disk_file::open): Only check for executable if
fb1a9f35 1425 the linked program is interested in the executable bit.
95a8465b
CF
1426 (fhandler_disk_file::check_execable_p): Delete.
1427 * fhandler.h (executable_states): New enumeration of various states of
1428 executable bit caring.
1429 (fhandler_base::set_execable_p): New method.
1430
1431 * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal
1432 has been sent to the tty. Return -1 when this is so.
1433 * fhandler_console.cc (fhandler_console::read): Return -1 when signal
1434 sending character encountered.
1435
1436 * path.cc (path_conv::check): Record when path refers to a disk device.
1437 Move executable extension check here.
1438 (check_sysfile): Accomodate new EXEC path states.
1439 (has_suffix): Remove.
1440 (next_suffix): Remove.
1441 (class suffix_scan): New clas.
1442 (suffix_scan::has): New method.
1443 (suffix_scan:next): New method.
1444 (symlink_info::check): Use suffix_scan method to control for scanning
1445 for suffixes.
1446 * path.h (path_conv::exec_state): New method.
1447 * perprocess.h: Make "C" friendly.
1448 * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC.
1449 Bump CYGWIN_VERSION_API_MINOR.
1450 * include/sys/cygwin.h: Change premain declarations.
1451
1452 * winsup.h: Move __cplusplus test to after builtin defines.
1453
306c4b67
ED
14542001-03-04 Egor Duda <deo@logos-m.ru>
1455
1456 * fhandler.h (class fhandler_tty_common): New mutex and event to
1457 syncronize input on master tty with slave tty.
1458 * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to
1459 syncronize with slave.
1460 * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and
1461 event to syncronize with master. Do not limit amount of data read
1462 from master to vmin value. Interrupt on signal and return already
1463 read data, if any.
1464 * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and
1465 event.
1466 * fhandler_tty.cc (fhandler_tty_common::close): Ditto.
1467 * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
1468 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto.
1469 * fhandler_tty.cc (fhandler_tty_common::dup): Ditto.
1470 * tty.h (tty::open_input_mutex): New function.
1471 * tty.cc (tty::common_init): Create input mutex and event.
1472
ed94def2
CV
1473Fri Mar 2 13:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
1474
1475 * dir.cc (readdir): Fix creating path in symlink check.
1476
e03f5f73
CV
1477Fri Mar 2 12:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
1478
1479 * dir.cc (readdir): Fix shortcut==symlink condition.
1480 * environ.cc: Add extern decl for `allow_winsymlinks'.
1481 (struct parse_thing): Add entry for `[no]winsymlinks'.
1482 * path.cc (symlink): Change to be able to create both,
1483 symlink==shortcut and symlink==systemfile, dependent of
1484 the setting of `allow_winsymlinks'.
1485 * security.cc (cygwin_logon_user): Add debug output.
1486 * shortcut.c: Add defines from path.h.
1487 (has_exec_chars): Copy from path.h.
1488 (check_shortcut): Check for executable file condition if not a
1489 shortcut.
1490
903c330d
CF
1491Thu Mar 1 21:06:07 2001 Christopher Faylor <cgf@cygnus.com>
1492
1493 * exceptions.cc (sig_handle_tty_stop): Ignore attempts to suspend a
1494 process if started by non-cygwin parent.
1495
d80999a1
CF
1496Thu Mar 1 20:48:11 2001 Christopher Faylor <cgf@cygnus.com>
1497
1498 * select.cc (peek_console): Don't report read_ready on mouse events
1499 unless we are looking for mouse events.
1500 * fhandler.h (fhandler_console::mouse_aware): New method.
1501
2de76014
CV
1502Wed Feb 28 15:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
1503
1504 * uinfo.cc: Eliminate `#include <wchar.h>'.
1505
739db26a
ED
15062001-02-28 Egor Duda <deo@logos-m.ru>
1507
1508 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Determine
1509 drive geometry or partition size to allow seeking from the end of
1510 raw floppy device. Don't allow positioning past the end of media or
1511 to offsets bigger then max off_t.
1512
a53136cc
ED
15132001-02-27 Egor Duda <deo@logos-m.ru>
1514
1515 * fhandler.h (class fhandler_console): Make all variables that
1516 describe "state" of console to be members of fhandler_console.
1517 default_color is now the color which is set when console recieves
1518 reset command.
1519 * fhandler_console.cc (fhandler_console::fhandler_console): Turn
1520 mouse handling and raw keyboard mode off by default. Initialize
1521 state information.
1522 * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
1523 function.
1524 * fhandler_console.cc (fhandler_console::set_default_attr): New
1525 function. Reset console attributes to default values.
1526 * fhandler_console.cc (fhandler_console::open): Reset attributes.
1527 * fhandler_console.cc (fhandler_console::get_win32_attr): New function.
1528 Calculate win32-style console attribute based on terminal attributes.
1529 * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use
1530 member variable.
1531 * fhandler_console.cc (fhandler_console::read): If in raw-win32
1532 keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
1533 sequences.
1534 * fhandler_console.cc (fhandler_console::dup): Copy all state
1535 information to the dup()ed handle.
1536 * fhandler_console.cc (fhandler_console::scroll_screen): Use current
1537 fill-in attribute.
1538 * fhandler_console.cc (fhandler_console::clear_screen): Ditto.
1539 * fhandler_console.cc (fhandler_console::char_command): Check if we
1540 saw '?' symbol by member variable. Set terminal attributes on \033[Xm
1541 commands. \033[24m - turn off underline mode, \033[27m - turn off
1542 reverse mode, \033[39m - restore default foreground color.
1543 \033[49m - restore default background color. \033[2000h - turn on raw
1544 keyboard mode, \033[2000l - turn off raw keyboard mode.
1545 * fhandler_console.cc (fhandler_console::write): Set attribues to
1546 default values on reset command.
1547
5b331f1e 15482001-02-26 Mike Simons <msimons@moria.simons-clan.com>
efd76e41 1549
5b331f1e
CF
1550 * times.cc (settimeofday): Replace function stub with working code.
1551
88429768
CV
1552Mon Feb 26 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
1553
1554 * strace.cc (strace::vprntf): Move prntf functionality to this function
1555 adding an va_list interface to strace.
1556 (strace::printf): Calls strace::vprntf now.
1557 (strace_printf): New function providing an extern "C" interface to
1558 trace output.
1559 * include/sys/strace.h: Make plain C clean.
1560 (class strace): Add `vprntf' method.
1561
6626ebfe
CV
1562Mon Feb 26 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
1563
1564 * shortcut.c: Remove #include <sys/strace.h>.
1565
649033a8
CV
1566Sun Feb 25 10:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
1567
1568 * path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
1569
80ed95f2
CV
1570Sun Feb 25 10:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
1571
649033a8 1572 * shortcut.c (check_shortcut): Change symlink condition.
80ed95f2 1573
675412e9
CV
1574Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
1575
1576 * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
1577 * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
1578
ff413a98
CV
1579Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
1580
1581 * path.cc (symlink): Keep relative paths relative in the DOS
659b480b
CV
1582 path inside of a shortcut. If that's impossible or the target
1583 path is already absolute save an absolute path.
ff413a98 1584
c5a4eacc
CV
1585Thu Feb 22 15:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
1586
1587 * cygerrno.h: Revert previous patch.
1588 * errno.cc: Ditto.
1589 * dir.cc: Eliminate `dir_suffixes'.
1590 (opendir): Remove usage of `dir_suffixes'.
1591 (rmdir): Ditto.
1592 * fhandler.cc (fhandler_disk_file::open): Remove usage of
1593 `inner_suffixes'.
1594 * path.cc: Rename `inner_suffixes' to `lnk_suffixes'.
1595 (path_conv::check): Remove usage of `inner_suffixes'.
1596 (symlink): Ditto.
1597 (symlink_info::check): Handle checking for `.lnk' in path_conv
1598 exclusively here.
1599 (chdir): Remove usage of `dir_suffixes'.
1600 * shortcut.c: Eliminate debug_printf lines.
1601 (check_shortcut): Don't set error except on failing ReadFile.
1602 * spawn.cc: Remove ".lnk" from `std_suffixes'.
1603 * syscalls.cc (_unlink): Remove usage of `inner_suffixes'.
1604 Remove ".lnk" from `stat_suffixes'.
1605 (_rename): Add check for renaming a symlink to keep the ".lnk"
1606 suffix after renaming.
1607
79e56091
CV
1608Thu Feb 22 13:38:00 2001 Corinna Vinschen <corinna@vinschen.de>
1609
1610 * shortcut.c: New file. Provides a C interface to reading of
1611 Windows shortcuts to avoid compiler flag `-fvtable-thunks'.
1612 * shortcut.h: Ditto.
1613 * Makefile.in: Add shortcut.o to DLL_OFILES.
1614 * cygerrno.h: Provide a C interface to `geterrno_from_win_error' for
1615 using in shortcut.c.
1616 * errno.cc (geterrno_from_win_error): Define as extern "C".
1617 * path.cc (struct symlink_info): Remove methods `check_shortcut' and
1618 `check_sysfile'.
1619 (shortcut_header): Move to shortcut.c.
1620 (shortcut_initalized): Ditto.
1621 (create_shortcut_header): Ditto.
1622 (cmp_shortcut_header): Ditto.
1623 (symlink_info::check_shortcut): Ditto. Reorganize as a plain C function.
1624 (symlink_info::check_sysfile): Redefine as a global function using the
1625 same parameter list as `check_shortcut' for clearness.
1626 (symlink_info::check): Change parameter list for calls to
1627 `check_shortcut' and `check_sysfile'.
1628
87e6b098
CV
1629Thu Feb 22 12:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
1630
1631 * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' when
1632 resolving real_path.
1633 * path.cc (symlink): Ditto for win32_topath.
1634
10b06c5e
CV
1635Wed Feb 21 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
1636
1637 * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.
1638 * autoload.cc: Add LoadDLLinitfunc for ole32.dll.
1639 Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0
1640 and CoCreateInstance@20.
1641 * dir.cc (dir_suffixes): New datastructure.
1642 (readdir): Check for R/O *.lnk files to hide the suffix.
1643 (opendir): Use `dir_suffixes' in path conversion.
1644 (rmdir): Ditto.
1645 * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag
1646 before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY
1647 into account only if the file is no symlink.
1648 * path.cc (inner_suffixes): New datastructure.
1649 (SYMLINKATTR): Eliminated.
1650 (path_conv::check): Use `inner_suffixes' on inner path components.
1651 (shortcut_header): New global static variable.
1652 (shortcut_initalized): Ditto.
1653 (create_shortcut_header): New function.
1654 (cmp_shortcut_header): Ditto.
1655 (symlink): Create symlinks by creating windows shortcuts. Preserve
1656 the old code.
1657 (symlink_info::check_shortcut): New method.
1658 (symlink_info::check_sysfile): Ditto.
1659 (symlink_info::check): Check for shortcuts. Move code reading
1660 old system attribute symlinks into symlink_info::check_sysfile().
1661 (chdir): Use `dir_suffixes' in path conversion.
1662 * security.cc (get_file_attribute): Check for S_IFLNK flag.
1663 Force 0777 permissions then.
1664 * spawn.cc (std_suffixes): Add ".lnk" suffix.
1665 * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion.
1666 Check for shortcut symlinks to eliminate R/O attribute before
1667 calling DeleteFile().
1668 (stat_suffixes): Add ".lnk" suffix.
1669 (stat_worker): Force 0777 permissions if file is a symlink.
1670
0917ed59
ED
16712001-02-21 Egor Duda <deo@logos-m.ru>
1672
1673 * sigproc.cc (getsem): Make semaphore always non-inheritable.
1674
441d7aee
CF
1675Mon Feb 19 22:25:53 2001 Christopher Faylor <cgf@cygnus.com>
1676
1677 * dcrt0.cc (locale_init): Remove.
1678
f97e7d75
CF
16792001-02-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1680
1681 * cygwin.din: Export rand48 functions.
1682 * thread.cc (MTinterface::Init): Remove the initialization of
1683 `reent_data'.
1684 * dcrt0.cc: Add the initalizer to the declaration of `reent_data'.
1685 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
1686
fc68bf34
ED
16872001-02-16 Egor Duda <deo@logos-m.ru>
1688
1689 * signal.cc (signal): Prohibit setting handlers for SIGKILL and
1690 SIGSTOP
1691 * signal.cc (sigaction): Ditto
1692 * syscalls.cc (_lseek): Return EINVAL on invalid input
1693
ee2c7251
CF
1694Wed Feb 14 14:54:40 2001 Christophe Iasci <chrisiasci@aol.com>
1695
1696 * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when
1697 the library is not found
1698
8f8e7442 16992001-02-14 Egor Duda <deo@logos-m.ru>
efd76e41 1700
8f8e7442
CF
1701 * fhandler_console.cc (fhandler_console::char_command): Ignore unknown
1702 rendition codes in \033[xx;yym control sequences
1703
cde0c2fb
CF
1704Fri Feb 9 23:19:01 2001 Christopher Faylor <cgf@cygnus.com>
1705
1706 * fork.cc (fork_parent): Return EAGAIN when can't record pid.
1707 * pinfo.h (pinfo::remember): Return value of call to proc_subproc.
1708 * sigproc.cc (proc_subproc): Return error if can't record pid.
1709
c41482c7
CF
1710Fri Feb 9 12:17:27 2001 Christopher Faylor <cgf@cygnus.com>
1711
1712 * syscalls.cc (mknod): Add valid parameters.
1713
889109ab
CV
1714Thu Feb 8 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
1715
1716 * mmap.cc (mmap): Check for reusing a mapping only on MAP_SHARED
1717 and on MAP_PRIVATE|MAP_ANON in the special case of offset 0.
1718
db49d0b5
CV
1719Thu Feb 8 21:57:00 2001 Corinna Vinschen <corinna@vinschen.de>
1720
1721 * mmap.cc (class list): Add member `hash'.
1722 (list::list): Initialize `hash'.
1723 (list::get_list_by_fd): Use filepath hash value to get the correct
1724 mapping list if it's not an anonymous mapping.
1725 (map::add_list): Initialize `hash' with filepath hash value.
1726 (mmap): Check for reusing a mapping only on MAP_SHARED.
1727
91d385fe
CF
1728Wed Feb 7 18:47:36 2001 Christopher Faylor <cgf@cygnus.com>
1729
1730 * signal.cc (killpg): Correct first argument.
1731
9182099c
CV
1732Wed Feb 7 22:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
1733
1734 * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
1735 Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12.
1736 * fhandler_socket.cc (fhandler_socket::ioctl): Move variable
1737 definitions to the beginning of the function to allow better debugging.
1738 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
1739 * net.cc: Include iphlpapi.h.
1740 (get_2k_ifconf): Rewritten. Uses IP Helper API now.
1741 (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC
1742 and SIOCGIFMTU.
1743 (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'.
1744 (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux.
1745 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
1746 Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only
1747 on Windows NT < Service Pack 3, `get_2k_ifconf otherwise.
1748 * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC
1749 and SIOCGIFMTU.
1750 * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'.
1751 (struct ifreq): Add `ifru_hwaddr'.
1752
d7ed877b
CV
1753Tue Feb 6 15:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
1754
1755 * syscalls.cc (stat_worker): Add a check for the special case when
1756 a process creates a file using mode 000 using ntsec.
1757
ae9b22c6
CV
1758Mon Feb 5 17:00:00 2001 Corinna Vinschen <corinna@vinschen.de>
1759
1760 * fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
1761 when opening raw disk devices.
1762 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
1763 access.
1764 * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
1765 binary.
1766 (fhandler_dev_raw::raw_write): Don't drop read buffer content when
1767 writing after read.
1768
cada03f9
CV
1769Mon Feb 5 13:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1770
1771 * mmap.cc (mmap_record::fixup_map): New method to duplicate
1772 the memory protection in a just forked child.
1773 (mmap): Realign gran_len to page boundary only on anonymous
1774 mapping before saving in the mmap_record.
1775 (munmap): Cleanup code.
1776 (msync): Ditto.
1777 (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
1778
47f81092
CF
1779Thu Feb 1 23:08:29 2001 Christopher Faylor <cgf@cygnus.com>
1780
1781 * cygheap.cc (creturn): Correctly calculate cygheap_max.
1782
f8da1507
CF
1783Wed Jan 31 10:04:58 2001 Christopher Faylor <cgf@cygnus.com>
1784
1785 * shared.cc (shared_info::initialize): Reduce size of heap.
1786
83443511
CV
1787Wed Jan 31 13:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
1788
1789 * include/sys/resource.h: Fix typo.
1790
44e6d951
CV
1791Wed Jan 31 13:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
1792
83443511 1793 * include/sys/resource.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.
44e6d951 1794
4f42df7b
CF
1795Tue Jan 30 18:15:23 2001 Christopher Faylor <cgf@cygnus.com>
1796
1797 * include/cygwin/version.h: Bump version to 1.3.0.
1798
9928a7e1
CV
1799Tue Jan 30 8:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
1800
1801 * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead of
1802 explicit cast (HANDLE) 0xffffffff.
1803 * shared.cc (open_shared): Ditto.
1804
747e88d3
CF
1805Mon Jan 29 17:15:22 2001 Bill Hegardt <bill@troyxcd.com>
1806
1807 * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED
1808 structure instead of shared structure to fix a race condition between
1809 read/write.
1810
68ea0dc2
CV
1811Mon Jan 29 14:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1812
1813 * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as
1814 being invalid.
1815
f977222f
CV
1816Mon Jan 29 10:23:00 2001 Corinna Vinschen <corinna@vinschen.de>
1817
1818 * mmap.cc (mmap_record::find_empty): Fix loop condition.
1819
6a4878cf
CF
1820Sun Jan 28 19:40:40 2001 Christopher Faylor <cgf@cygnus.com>
1821
1822 * syscalls.cc (_link): Make sure that newpath does not exist. Set
1823 errno if it does.
1824
1825Sun Jan 28 19:29:08 2001 Christopher Faylor <cgf@cygnus.com>
1826
1827 * cygheap.cc (init_cheap): Don't specify a load address for the heap.
1828 It doesn't work on #!*& Windows 9x.
1829 (cygheap_init): Move GetUserName to memory_init.
1830 * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call
1831 to heap_init.
1832 * heap.cc (heap_init): Improve error output.
1833 * heap.h: Correct some declarations.
1834 * shared.cc (mount_table_init): Remove.
1835 (memory_init): Renamed from shared_init. Reorganize to accomodate
1836 strange Windows 9x problems with cygheap/heap interaction.
1837 * shared_info.h: Rename shared_init to memory_init.
1838
ae6c8e4f
CF
1839Sun Jan 28 01:25:33 2001 Christopher Faylor <cgf@cygnus.com>
1840
1841 * include/cygwin/version.h: Bump API version.
1842
9a089f21
CF
1843Sun Jan 28 01:18:22 2001 Christopher Faylor <cgf@cygnus.com>
1844
1845 * cygheap.cc (init_cheap): Move username initialization.
1846 (cygheap_init): Here.
1847 * shared_info.h (mount_info): Add a sys_mount_table_counter field.
1848 (shared_info): Ditto.
1849 * path.cc (mount_info::conv_to_win32_path): Check that our mount table
1850 is in sync with the system mount table and reinitialize it if not.
1851 (mount_info::add_reg_mount): Bump sys_mount_table counters if the
1852 system mount table changes.
1853 (mount_info::del_reg_mount): Ditto.
1854 (mount_info::write_cygdrive_info_to_registry): Ditto.
1855 (mount_info::remove_cygdrive_info_from_registry): Ditto.
1856
2a6fc028
CF
1857Sun Jan 28 00:28:30 2001 Christopher Faylor <cgf@cygnus.com>
1858
1859 Throughout, change 'cygwin_shared.mount' to 'mount_table'.
1860 * child_info.h (child_info): Move shared_h, console_h to cygheap. Add
1861 mount_h.
1862 * cygheap.h (init_cygheap): Add shared_h, console_h.
1863 * cygheap.cc (init_cheap): Initialize heap at a fixed location after
1864 the shared memory regions. Initialize cygheap->user name here.
1865 * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants.
1866 Remove cygheap_init since it is done in shared_init now.
1867 (_dll_crt0): Initialize mount_h, remove shared_h and console_h
1868 initialization.
1869 * fhandler_console.cc (console_shared_h): Eliminate.
1870 (get_tty_stuff): Use cygheap->console_h rather than console_shared_h.
6a4878cf
CF
1871 * heap.cc (heap_init): Use page size constant calculated earlier in
1872 initialization.
2a6fc028
CF
1873 * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h.
1874 (mount_table_init): New function for initializing a user mount table.
6a4878cf
CF
1875 (open_shared_file_map): Use constant for shared memory region.
1876 Initialize cygheap and mount table here.
2a6fc028
CF
1877 (open_shared): Improve debugging output.
1878 (shared_info::initialize): Eliminate call to mount.init.
1879 (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h.
1880 (open_shared_file_map): Eliminate.
1881 * shared_info.h (mount_info): Add a version field.
6a4878cf
CF
1882 (shared_align_past): New macro for calculating location for shared
1883 memory regions.
2a6fc028 1884 * sigproc.cc (init_child_info): Eliminate shared_h, console_h.
6a4878cf
CF
1885 * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different
1886 user.
2a6fc028
CF
1887 * syscalls.cc (system_info): New global holding system memory defaults.
1888 (getpagesize): Use system_info.
1889 * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent.
1890 * winsup.h: Declare system_info.
1891
6a4878cf
CF
1892 * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than
1893 retrieving the name again.
2a6fc028 1894
bdfeca60
CF
1895Sat Jan 27 10:18:02 2001 Christopher Faylor <cgf@cygnus.com>
1896
1897 * path.cc (path_conv::check): Detect when path has symlinks.
1898 (symlink_info::check): Remove debugging stuff.
1899 (chdir): Use posix'ized win32 path if cd'ed to a path using symlinks.
1900
206a8d88
CF
1901Fri Jan 26 21:20:28 2001 Christopher Faylor <cgf@cygnus.com>
1902
1903 * exceptions.cc (sigreturn): Call any pending signals prior to
1904 resetting the signal mask so that stacked signals behave correctly.
1905 (sigdelayed): Avoid a race where a signal could end up calling an
1906 incorrect signal handler if two signals come in close together.
1907
174f1a39
CV
1908Tue Jan 23 21:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1909
1910 * mmap.cc (fhandler_disk_file::mmap): Call CreateFileMapping with
1911 len != 0 only when performing an anonymous mapping.
1912
4c7b8250
CF
1913Mon Jan 22 15:35:28 2001 Christopher Faylor <cgf@cygnus.com>
1914
1915 * path.h: Add a new constant.
1916 * syscalls.cc (_read): Oscillate errno check.
1917
c65a3183
CF
1918Mon Jan 22 15:27:12 2001 Christopher Faylor <cgf@cygnus.com>
1919
1920 * include/cygwin/version.h: Bump API to reflect setlogmask.
1921
29c39fe3
CF
1922Sun Jan 21 22:40:25 2001 Jason Tishler <jt@dothill.com>
1923
1924 * cygwin.din: Add export for setlogmask().
1925 * syslog.cc (setlogmask): New function.
1926
c807d355
CV
1927Thu Jan 18 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
1928
1929 * resource.cc (setrlimit): Support RLIMIT_NOFILE.
1930
4e2a97b2
CF
1931Wed Jan 17 23:23:12 2001 Christopher Faylor <cgf@cygnus.com>
1932
1933 * syscalls.cc (setdtablesize): Call with amount to increment not total
1934 amount. Return success or failure error code.
1935
a7cde2b9
CF
1936Wed Jan 17 09:47:13 2001 Christopher Faylor <cgf@cygnus.com>
1937
1938 * autoload.cc (LoadDLLinitfunc): Remove debugging statement.
1939
1940 * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to
1941 earlier in interrupt.
1942 ((interrupt_setup): i.e., here.
1943 (sig_handle): Don't queue multiple SIGSTOPS.
1944 * fhandler.h (bg_check_types): Enumerate return value of bg_check for
1945 clarity.
1946 * signal.cc (kill_pgrp): Minor cleanup.
1947 * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type
1948 for function return. Don't raise signal if a signal is already queued.
1949 * fhandler_console.cc (fhandler_console::read): Use enumerated return
1950 type for bg_check.
1951 * select.cc: Ditto, throughout.
1952 * read.cc: Ditto, throughout.
1953 * termios.cc: Ditto, throughout.
1954 (_read): YA interrupt detect simplification.
1955 * wait.cc (wait4): Ditto.
1956
cb503978
CV
1957Wed Jan 17 10:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1958
1959 * cygheap.cc (cygheap_user::~cygheap_user): Temporarily
1960 disable free'ing memory.
1961
9fedfd57
CV
1962Tue Jan 16 18:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
1963
1964 * mmap.cc (mmap): Initialize fh to avoid compiler warnings.
1965
9470a80c
CF
1966Mon Jan 15 21:07:00 2001 Christopher Faylor <cgf@cygnus.com>
1967
1968 * wait.cc (wait4): Rename variable for consistency. Allow restartable
1969 signal behavior.
1970
9334c89c
CV
1971Mon Jan 15 23:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
1972
1973 * mmap.cc (mmap): Add more parameter checking. Change error output
1974 in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
1975
c6dd43f2
CV
1976Mon Jan 15 20:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
1977
1978 * mmap.cc: include <unistd.h>. Define some bit operations for
1979 the new page map.
1980 (mmap_record): Change type of base_address_ to caddr_t.
1981 Add map_map_ member. Add several methods to manipulate map_map_.
1982 (mmap_record::alloc_map): New method.
1983 (mmap_record::free_map): Ditto.
1984 (mmap_record::find_empty): Ditto.
1985 (mmap_record::map_map): Ditto.
1986 (mmap_record::unmap_map): Ditto.
1987 (list::add_record): Change return type to `mmap_record *'.
1988 Allocate page map.
1989 (list::match): New method.
1990 (mmap): Partly rewritten to take care for the new page map. Add some
1991 parameter checking.
1992 (munmap): Ditto.
1993
66097f06
CV
1994Mon Jan 15 13:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
1995
1996 * heap.cc (heap_init): Fix extern declaration of getpagesize.
1997 * syscalls.cc (getpagesize): Fix another typo.
1998
dc3651b6
CV
1999Mon Jan 15 12:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
2000
2001 * syscalls.cc (getpagesize): Save pagesize in global variable to
2002 avoid calling GetSystemInfo too often.
2003 * heap.cc (getpagesize): Eliminate.
2004 (heap_init): Use getpagesize function from syscalls.cc.
2005
4cf2c0e0
CV
2006Mon Jan 15 11:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
2007
2008 * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZE
2009 request to avoid implementing the same twice.
2010
a3ec080b
CF
2011Sun Jan 14 14:07:50 2001 Christopher Faylor <cgf@cygnus.com>
2012
2013 * syscalls.cc (_read): Use more lightweight method for determining if
2014 read has been interrupted by a signal.
2015
c3d62298
CF
2016Fri Jan 12 00:35:15 2001 Christopher Faylor <cgf@cygnus.com>
2017
2018 * debug.h: Add regparm attributes to some functions.
2019
2020 * signal.cc (sigaction): Don't treat SIGCONT specially.
2021
6a4878cf
CF
2022 * exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal
2023 for later use.
c3d62298
CF
2024 (sig_handler): Default any stopping signal to SIGSTOP.
2025 (call_signal_handler): New function.
2026 (sigdelayed0): New function.
6a4878cf
CF
2027 * sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special
2028 behavior.
c3d62298
CF
2029 * sigproc.h: Define call_signal_handler.
2030 * syscalls.cc (_read): Allow restartable signal behavior.
2031
c4efddf6
CV
2032Thu Jan 11 13:17:00 2001 Corinna Vinschen <corinna@vinschen.de>
2033
2034 * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.
2035 (fhandler_disk_file: Ditto.
2036 (fhandler_dev_mem): Ditto.
2037 * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute
2038 for device\physicalmemory handle.
2039 (fhandler_dev_mem::mmap): Ditto.
6a4878cf
CF
2040 * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New
2041 method.
2042 * mmap.cc (mmap_record): Add private `fdesc_' member. Change
2043 constructor accordingly.
c4efddf6
CV
2044 (get_fd): New method.
2045 (mmap): Use new mmap_record constructor.
2046 (fhandler_base::fixup_mmap_after_fork): New method.
2047 (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
6a4878cf 2048 (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate
c4efddf6
CV
2049 fhandler class.
2050
7416e1d2
CF
2051Wed Jan 10 22:08:30 2001 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2052
2053 * sigproc.cc (wait_sig): Allow SIGCONT when stopped.
2054
55ae1dff
CV
2055Tue Jan 9 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
2056
2057