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