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