]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/ChangeLog
* configure.in: Use 'install-sh -c'.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
1 2003-07-25 Christopher Faylor <cgf@redhat.com>
2
3 * configure.in: Use 'install-sh -c'.
4 * configure: Regenerate.
5
6 2003-07-25 Christopher Faylor <cgf@redhat.com>
7
8 * configure.in: Always use install-sh.
9 * configure: Regenerate.
10
11 2003-07-25 Christopher Faylor <cgf@redhat.com>
12
13 * include/cygwin/socket.h: Conditionalize [AP]F_INET6 define.
14
15 2003-07-25 Christopher Faylor <cgf@redhat.com>
16
17 * Makefile.in (OBSOLETE_FUNCTION): Add fdopen.
18
19 2003-07-25 Christopher Faylor <cgf@redhat.com>
20
21 * cygwin.din: Export _fdopen64
22 * Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
23 * include/cygwin/version.h: Bump api minor number.
24
25 * ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT
26 definition.
27
28 2003-07-24 Christopher Faylor <cgf@redhat.com>
29
30 * environ.cc (check_case_init): Use strncasematch.
31
32 * cygwin.din: Export __mempcpy.
33 * cygwin/version.h: Bump api minor number.
34
35 2003-07-21 Pavel Tsekov <ptsekov@gmx.net>
36
37 * mmap.cc: Use proper format specifiers for _off64_t and size_t in
38 format strings passed to syscall_printf () and debug_printf ()
39 throughout.
40
41 2003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
42
43 * security.cc (verify_token): Fix white space and style.
44 Use type bool instead of BOOL and char. Use alloca
45 instead of malloc and free for my_grps.
46
47 2003-07-17 Corinna Vinschen <corinna@vinschen.de>
48
49 * sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
50 _SC_PAGESIZE again.
51
52 2003-07-14 Corinna Vinschen <corinna@vinschen.de>
53
54 * cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
55 value for tokens.
56 * syscalls.cc (seteuid32): Ditto. Set new_token to process token if
57 process token is suitable.
58 * uinfo.cc (uinfo_init): Initialize tokens in cygheap user info
59 to INVALID_HANDLE_VALUE.
60
61 2003-07-14 Pierre Humblet <pierre.humblet@ieee.org>
62
63 * cygheap.h (enum impersonation): Delete.
64 (cygheap_user::impersonation_state): Delete.
65 (cygheap_user::current_token): New.
66 (cygheap_user::issetuid): Modify to use current_token.
67 (cygheap_user::token): Ditto.
68 (cygheap_user::deimpersonate): Ditto.
69 (cygheap_user::reimpersonate): Ditto.
70 (cygheap_user::has_impersonation_tokens): Ditto.
71 (cygheap_user::close_impersonation_tokens): Ditto.
72 * security.cc (cygwin_set_impersonation_token): Always set the token.
73 (verify_token): Change type of gsid to cygpsid.
74 (get_file_attribute): Use the effective ids.
75 * syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
76 * uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
77
78 2003-07-12 Christopher Faylor <cgf@redhat.com>
79
80 * pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
81 communicating pid actually stops eventually.
82
83 2003-07-10 Christopher Faylor <cgf@redhat.com>
84
85 * path.cc (get_device_number): Remove special com? consideration.
86 (special_chars): Make static.
87 (special_introducers): New.
88 (special_char): Allow specified valid_chars args.
89 (fnunmunge): Handle aux-like filenames correctly.
90 (special_name): Add con, conin$, conout$.
91 (mount_item::fnmunge): Use __small_sprintf return value to calculate
92 increments.
93
94 2003-07-09 Christopher Faylor <cgf@redhat.com>
95
96 * include/cygwin/version.h: Bump DLL minor number to 1.
97
98 2003-07-09 Christopher Faylor <cgf@redhat.com>
99
100 * fhandler_proc.cc (format_proc_stat): Use correctly sized constants
101 for filling in zeros on 98.
102
103 2003-07-09 Christopher Faylor <cgf@redhat.com>
104
105 * fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space
106 for stat buffer.
107 (format_proc_stat): Reorganize to accumulate and report on all cpus.
108
109 2003-07-09 Christopher Faylor <cgf@redhat.com>
110
111 * sysconf.cc (sysconf): Return processors online rather than bitmask
112 for _SC_NPROCESSORS_ONLN.
113
114 2003-07-08 Christopher Faylor <cgf@redhat.com>
115
116 * cygheap.cc (creturn): Set appropriate errno when out of memory.
117 (ccalloc): Only issue system_printf when debugging.
118 * dtable.cc (dtable::extend): Only allocate 100 * the incremental growth
119 size max. Set errno appropriately.
120 (dtable::build_fhandler): Check for error from set_name.
121 * fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
122 * fhandler.h (fhandler_base::set_name): Change to bool.
123 * fhandler_process.cc (format_process_stat): Fix formatting.
124 * resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
125 * sysconf.cc (sysconf): Ditto.
126
127 2003-07-07 Christopher Faylor <cgf@redhat.com>
128
129 * rmsym: Don't use ranlib.
130
131 2003-07-07 Christopher Faylor <cgf@redhat.com>
132
133 * newsym: Reenable removal of tmp directory. Just use ar to generate
134 archive index.
135 * Makefile.in: Don't send ranlib to newsym or rmsym.
136
137 2003-07-07 Christopher Faylor <cgf@redhat.com>
138
139 * newsym: Create objects that are closer to those created by dlltool so
140 as not to confuse --export-all-symbols.
141 * rmsym: Be a little more accepting of object filenames now that
142 dlltool can create different format files.
143
144 2003-07-06 Christopher Faylor <cgf@redhat.com>
145
146 * newsym: Oops. Revert below change.
147
148 2003-07-06 Christopher Faylor <cgf@redhat.com>
149
150 * newsym: Use correct prefix for generating imports.
151 * pinfo.cc (_pinfo::commune_send): Don't wait forever for a response
152 from another process.
153
154 2003-07-06 Christopher Faylor <cgf@redhat.com>
155
156 * syscalls.cc (gethostid): Set thread affinity so that results are
157 predictable.
158
159 2003-07-05 Corinna Vinschen <corinna@vinschen.de>
160
161 * mmap.cc (list::match): Add parameters to return valid address and
162 length back to munmap(). Evaluate intersection between given
163 area and mapped area and return it, if any.
164 (mmap64): On regular files, don't allow mappings beginning beyond
165 EOF. Return with errno set to ENXIO instead.
166 (munmap): Rewrite SUSv3 conformant. Check if given memory area is
167 valid. Unmap all maps inside given memory area. Don't return error
168 if no mapping has been unmapped.
169
170 2003-07-05 N Stephens <nigel@mips.com>
171
172 * fhandler.h (fhandler_socket::get_connect_state): New method to
173 return socket connection state.
174 * fhandler_socket.cc (dup): Copy socket connect state to new file
175 handle.
176 * net.cc (cygwin_rcmd): Mark file handles of sockets returned by
177 rcmd() as CONNECTED state.
178 (cygwin_rexec): Similarly for rexec().
179 (socketpair): Mark both ends of a new socket pair as CONNECTED.
180
181 2003-07-04 Corinna Vinschen <corinna@vinschen.de>
182
183 * mmap.cc (fhandler_disk_file::mmap): Fix address test.
184
185 2003-07-03 Christopher Faylor <cgf@redhat.com>
186
187 * path.cc (fillout_mntent): Change "posix" to "managed".
188
189 2003-07-02 Christopher Faylor <cgf@redhat.com>
190
191 * fhandler.h (FH_ENC): New enum.
192 (fhandler_base::get_encoded): New function.
193 (fhandler_base::set_encoded): Ditto.
194 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag
195 in fhandler, as appropriate.
196 (fhandler_disk_file::readdir): Unmunge filename as appropriate based on
197 new encoding flag.
198 * path.cc (normalize_posix_path): Don't punt on files with colons.
199 (special_char): New function.
200 (mount_item::fnmunge): Ditto.
201 (fnunmunge): Ditto.
202 (special_name): Ditto.
203 (mount_item::build_win32): Avoid drive considerations when file is
204 encoded.
205 (mount_info::conv_to_win32_path): Handle encoded filenames.
206 (mount_info::conv_to_posix_path): Ditto.
207 (fillout_mntent): Add posix string when directory is encoded.
208 * path.h (fnunmunge): Declare.
209 (path_conv::is_encoded): Declare.
210
211 2003-07-03 Christopher Faylor <cgf@redhat.com>
212
213 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
214 more of the cygserver stuff so that ttys actually work.
215
216 2003-07-03 Corinna Vinschen <corinna@vinschen.de>
217
218 * mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
219 If a non-zero addr is given, align it to the next lower 64K boundary.
220 (fhandler_disk_file::mmap): If a non-zero address is given, try
221 mapping using the given address first. If it fails and flags is not
222 MAP_FIXED, try again with NULL address.
223
224 2003-07-01 Christopher Faylor <cgf@redhat.com>
225
226 * thread.cc: Remove _MT_SAFE conditional.
227
228 2003-07-01 Christopher Faylor <cgf@redhat.com>
229
230 * configure.in: Fix --enable-server option.
231 * configure: Regenerate.
232
233 2003-07-01 Christopher Faylor <cgf@redhat.com>
234
235 * Makefile.in: Remove cygserver stuff.
236 * acconfig.h: Add USE_CYGSERVER define.
237 * config.h.in: Regenerate.
238 * configure.in: Add --enable-server setting.
239 * configure: Regenerate.
240 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
241 compilation of cygserver stuff.
242 * fork.cc (fork_child): Ditto.
243 * shm.cc: Ditto.
244 * tty.cc (tty::common_init): Ditto.
245
246 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
247 definitions.
248 * environ.cc: Ditto.
249 * ntea.cc: Ditto.
250 * security.cc: Ditto.
251 * security.h: Ditto.
252 * syscalls.cc (check_posix_perm): Remove externs that were already
253 declared in a header.
254 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
255 cygwin should always be _MT_SAFE.
256
257 2003-07-01 Christopher Faylor <cgf@redhat.com>
258
259 * thread.cc: Remove _MT_SAFE conditional.
260
261 2003-07-01 Christopher Faylor <cgf@redhat.com>
262
263 * configure.in: Fix --enable-server option.
264 * configure: Regenerate.
265
266 2003-07-01 Christopher Faylor <cgf@redhat.com>
267
268 * Makefile.in: Remove cygserver stuff.
269 * acconfig.h: Add USE_CYGSERVER define.
270 * config.h.in: Regenerate.
271 * configure.in: Add --enable-server setting.
272 * configure: Regenerate.
273 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
274 compilation of cygserver stuff.
275 * fork.cc (fork_child): Ditto.
276 * shm.cc: Ditto.
277 * tty.cc (tty::common_init): Ditto.
278
279 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
280 definitions.
281 * environ.cc: Ditto.
282 * ntea.cc: Ditto.
283 * security.cc: Ditto.
284 * security.h: Ditto.
285 * syscalls.cc (check_posix_perm): Remove externs that were already
286 declared in a header.
287 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
288 cygwin should always be _MT_SAFE.
289
290 2003-06-30 Pierre Humblet <pierre.humblet@ieee.org>
291
292 * cygheap.h (enum impersonation): New enum.
293 (cygheap_user::token): Delete.
294 (cygheap_user::impersonated): Delete.
295 (cygheap_user::external_token): New member.
296 (cygheap_user::internal_token): New member.
297 (cygheap_user::impersonation_state): New member.
298 (cygheap_user::issetuid): Modify.
299 (cygheap_user::token): New method.
300 (cygheap_user::deimpersonate): New method.
301 (cygheap_user::reimpersonate): New method.
302 (cygheap_user::has_impersonation_tokens): New method.
303 (cygheap_user::close_impersonation_tokens): New method.
304 * dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
305 * fhandler_socket.cc (fhandler_socket::dup): Ditto.
306 * fork.cc (fork_child): Ditto.
307 (fork_parent): Ditto.
308 * grp.cc (internal_getgroups): Ditto.
309 * security.cc (verify_token): Ditto.
310 (check_file_access): Ditto.
311 (cygwin_set_impersonation_token): Detect conflicts. Set
312 user.external_token.
313 * spawn.cc (spawn_guts): Use new cygheap_user methods.
314 * syscalls.cc (seteuid32): Rearrange to use the two tokens
315 in cygheap_user.
316 (setegid32): Use new cygheap_user methods.
317 * uinfo.cc: (internal_getlogin): Ditto.
318
319 2003-06-25 Doru Carastan <doru.carastan@mvista.com>
320
321 * Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL.
322
323 2003-06-24 Thomas Pfaff <tpfaff@gmx.net>
324
325 * thread.cc (MTinterface::fixup_after_fork): Fix thread list after
326 fork.
327 (pthread::threads): Instantiate.
328 (pthread::pthread): Initialize running and suspendend.
329 Initialize next with NULL.
330 Add thread to thread list if it is not the null_pthread.
331 (pthread::~pthread): Remove thread from thread list if it is
332 not the null_pthread.
333 (pthread::postcreate): Set running flag.
334 (pthread::exit): Reset running flag.
335 (pthread::cancel): Try to cancel thread only if still running.
336 (pthread::_fixup_after_fork): Implement.
337 (pthread::detach): Check if thread is still running before detach.
338 * thread.h (pthread::running): New member.
339 (pthread::next): Ditto.
340 (pthread::fixup_after_fork): New static method.
341 (pthread::threads): New static method.
342 (pthread::_fixup_after_fork): New method.
343
344 2003-06-20 Christopher Faylor <cgf@redhat.com>
345
346 * pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a
347 pure windows process.
348
349 2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
350
351 * autoload.cc (GetNetworkParams): Add.
352 * net.cc (getdomainname): Call GetNetworkParams and read the
353 DhcpDomain registry value if warranted.
354
355 2003-06-17 Christopher Faylor <cgf@redhat.com>
356
357 * path.cc (mount): Do more strict checking on posix path arguments.
358
359 2003-06-15 Christopher Faylor <cgf@redhat.com>
360
361 Throughout, remove "include <errno.h>" from files which already include
362 cygerrno.h.
363
364 2003-06-15 Thomas Pfaff <tpfaff@gmx.net>
365
366 * include/cygwin/config.h (__DYNAMIC_REENT__): Define.
367 * include/cygwin/version.h: Bump API minor version.
368 * cygwin.din: Export __getreent
369 * cygerrno.h: Include errno.h. Fix places where _impure_ptr is used
370 directly to store the errno value.
371 * debug.cc (__set_errno): Ditto.
372 * errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
373 * signal.cc: Rename _reent_clib to _REENT throughout.
374 * thread.h (reent_clib): Remove prototype.
375 * thread.cc (reent_clib): Rename reent_clib to __getreent. Return
376 _impure_ptr until MTinterface is initialized.
377 (reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL
378 instead.
379 * MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to
380 keep signal handling running when fork is called from a thread other
381 than the mainthread.
382
383 2003-06-12 Thomas Pfaff <tpfaff@gmx.net>
384
385 * thread.cc (pthread_attr_init): Revert change from 2003-06-11
386 to return 0 if attribute is already initialized back to EBUSY.
387 (pthread_condattr_init): Ditto.
388 (pthread_rwlockattr_init): Ditto.
389 (pthread_mutexattr_init): Ditto.
390
391 2003-06-12 Corinna Vinschen <corinna@vinschen.de>
392
393 * exceptions.cc (ctrl_c_handler): Don't send a signal on
394 CTRL_SHUTDOWN_EVENT. Add a comment to rationalize the patch.
395
396 2003-06-11 Thomas Pfaff <tpfaff@gmx.net>
397
398 * thread.cc (pthread_attr_init): Return 0 if attribute is already
399 initialized.
400 Fix return code if out of memory.
401 (pthread_condattr_init): Ditto.
402 (pthread_rwlockattr_init): Ditto.
403 (pthread_mutexattr_init): Return 0 if attribute is already
404 initialized.
405
406 2003-06-09 Pierre Humblet <pierre.humblet@ieee.org>
407
408 * spawn.cc (spawn_guts): Call CreateProcess while impersonated,
409 when the real {u,g}ids and the groups are original.
410 Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
411 * uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
412 while impersonated, preserve the uids and gids and call
413 ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.
414
415 * exceptions.cc (error_start_init): Quote the pgm in the command.
416
417 2003-06-07 Christopher Faylor <cgf@redhat.com>
418
419 * poll.cc: Define FD_SETSIZE to ridiculously large number so that there
420 will be no artificially small limits.
421
422 2003-06-07 Christopher Faylor <cgf@redhat.com>
423
424 * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when
425 last tty closes.
426
427 2003-06-07 Thomas Pfaff <tpfaff@gmx.net>
428
429 * fhandler_socket.cc (fhandler_socket::connect): Change error
430 handling for nonblocking connects to return EALREADY when
431 connect is called more than once for the same socket.
432
433 2003-06-06 Corinna Vinschen <corinna@vinschen.de>
434
435 * cygwin.din: Add vsyslog.
436 * fhandler.cc (fhandler_base::write): Only make file sparse if the
437 seeked area is >= 128K.
438 * syslog.cc (vsyslog): New function, overtaking functionality from
439 syslog.
440 (syslog): Just call vsyslog.
441 * include/cygwin/version.h: Bump API minor.
442 * include/sys/syslog.h: Add vsyslog declaration.
443
444 2003-06-05 Christopher Faylor <cgf@redhat.com>
445
446 * cygthread.cc (cygthread::terminate_thread): Change system_printf to
447 debug_printf.
448
449 2003-06-04 Christopher Faylor <cgf@redhat.com>
450
451 * shared.cc (shared_info::heap_chunk_size): Be really defensive about
452 making sure that heap_chunk is set.
453
454 2003-06-04 Christopher Faylor <cgf@redhat.com>
455
456 * path.cc (conv_path_list): Use correct value when calculating length
457 to avoid a potential SEGV.
458
459 2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
460
461 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
462 as non-executable if the file cannot be opened for read. Retry query
463 open only if errno is EACCES. Never change the mode, even if it is 000
464 when query open() fails.
465
466 2003-06-03 Christopher Faylor <cgf@redhat.com>
467
468 * configure.in: Allow any i?86 variant.
469 * configure: Regenerate.
470
471 2003-06-03 Corinna Vinschen <corinna@vinschen.de>
472 Thomas Pfaff <tpfaff@gmx.net>
473
474 * fhandler_socket.cc (connect_thread): Remove.
475 (accept_thread): Remove.
476 (fhandler_socket::connect): Remove all special blocking handling.
477 (fhandler_socket::accept): Ditto.
478 * net.cc (cygwin_connect): Make blocking sockets temporarily
479 non-blocking and call cygwin_select on them to be interruptible.
480 (cygwin_accept): Ditto.
481
482 2003-06-02 Christopher Faylor <cgf@redhat.com>
483
484 * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist.
485
486 2003-06-02 Christopher Faylor <cgf@redhat.com>
487
488 * cygthread.h (cygthread::terminate_thread): Mark private.
489 * cygthread.cc (cygthread::terminate_thread): Deallocate free_range
490 thread stuff.
491
492 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
493
494 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
495 to `interrupted' as used in fhandler_socket::connect.
496
497 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
498
499 * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
500 patch.
501 (fhandler_socket::accept): Ditto.
502
503 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
504
505 * fhandler_socket.cc: Include cygthread.h.
506 (class sock_event): Remove.
507 (thread_connect): New function.
508 (thread_accept): Ditto.
509 (fhandler_socket::connect): Use cygthread instead of socket event
510 handling for blocking sockets.
511 (fhandler_socket::accept): Ditto.
512
513 2003-06-02 Christopher Faylor <cgf@redhat.com>
514
515 * fhandler.cc (fhandler_base::write): Correct minor printf formatting
516 style glitch.
517
518 2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
519
520 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
521 an existing directory is a root if FindFirstFile fails.
522
523 2003-05-30 Christopher Faylor <cgf@redhat.com>
524
525 * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
526 was actually valid. Fix it.
527
528 2003-05-30 Christopher Faylor <cgf@redhat.com>
529
530 * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
531 have problems with.
532
533 * path.cc (path_conv::check): Rework has_acls logic slightly. Uncouple
534 exec tests away from filesystem tests.
535
536 2003-05-30 Corinna Vinschen <corinna@vinschen.de>
537
538 * include/sys/param.h: Add DEV_BSIZE.
539
540 2003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
541 Corinna Vinschen <corinna@vinschen.de>
542
543 * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
544 conditional.
545
546 2003-05-28 Christopher Faylor <cgf@redhat.com>
547
548 * mkvers.sh: Avoid "-dontuse" tags.
549
550 * path.cc (path_conv::check): Set exec state based on known situations.
551
552 * path.cc (mount_item::fnmunge): New function.
553 (mount_item::build_win32): New function.
554 (mount_info::conv_to_win32_path): Use build_win32 to build windows
555 path.
556 * path.h (mount_item::fnmunge): Declare new function.
557 (mount_item::build_win32): Ditto.
558 * sys/mount.h (MOUNT_ENC): Define.
559
560 2003-05-28 Corinna Vinschen <corinna@vinschen.de>
561
562 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
563 revert to original account before calling fixup_before_fork_exec
564 and impersonate again afterwards. Change comment accordingly.
565 Clean up error handling and debug output.
566
567 2003-05-27 Thomas Pfaff <tpfaff@gmx.net>
568
569 * fhandler_socket.cc (sock_event::~sock_event): New method.
570 (sock_event::load): Change to void. Check if winsock2 is available.
571 (socke_event::wait): Return 0 if interruptible mode is not available.
572 (fhandler_socket::connect): Remove checks for winsock2 availability.
573 (fhandler_socket::accept): Ditto.
574
575 2003-05-27 Corinna Vinschen <corinna@vinschen.de>
576
577 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
578 using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
579
580 2003-05-27 Bill C. Riemers <cygwin@docbill.net>
581
582 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
583 permissions through umask on FAT or if ntsec is off.
584
585 2003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
586
587 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
588
589 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
590
591 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
592 instead of numeric constant.
593
594 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
595
596 * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
597 sock_event methods by a check for WinSock2 availability.
598 (fhandler_socket::accept): Ditto.
599
600 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
601
602 * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
603 (fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
604 (fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
605 (fhandler_base::set_fs_flags): New method.
606 (fhandler_base::get_fs_flags): Ditto.
607 * fhandler.cc (fhandler_base::write): Make 64 bit clean. Convert file
608 to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
609 (fhandler_base::lseek): Call set_did_lseek() instead of
610 set_check_win95_lseek_bug().
611 (fhandler_base::fhandler_base): Initialize fs_flags to 0.
612 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
613 as "sparse" unconditionally. Set fs_flags member.
614
615 2003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
616
617 * autoload.cc (GetDiskFreeSpaceEx): Add.
618 * syscalls.cc (statfs): Call full_path.root_dir() instead of
619 rootdir(full_path). Use GetDiskFreeSpaceEx when available and
620 report space available in addition to free space.
621 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
622 Do not call FindFirstFile for disk root directories.
623
624 2003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
625
626 * fhandler_process.cc (format_process_stat): Use PagefileUsage
627 instead of VirtualSize.
628 (get_mem_values): Ditto.
629
630 2003-05-21 Corinna Vinschen <corinna@vinschen.de>
631
632 * shared_info.h: Match shared_name declaration with below change.
633 * shared.cc (shared_name): Use incoming char * parameter instead of
634 local static buffer.
635 (open_shared): Accomodate new calling convention for shared_name.
636 * exceptions.cc (events_init): Ditto.
637 * sigproc.cc (getsem): Ditto.
638 * syscalls.cc (login): Ditto.
639 (logout): Ditto.
640 (pututline): Ditto.
641
642 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
643
644 * fhandler_socket.cc (secret_event_name): Return void. Use incoming
645 char * parameter instead of local static buffer.
646 (fhandler_socket::create_secret_event): Accomodate new calling
647 convention for secret_event_name.
648 (fhandler_socket::close_secret_event): Ditto.
649
650 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
651
652 * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
653 (ENTROPY_SOURCE_NAME): Ditto.
654 (secret_event_name): New static function. Create shared event name
655 with "Global\" prefix on systems supporting terminal services.
656 (fhandler_socket::set_connect_secret): Fix conditional.
657 (fhandler_socket::create_secret_event): Create secret event using
658 secret_event_name().
659 (fhandler_socket::close_secret_event): Ditto.
660 * shared.cc (shared_name): Create shared object name with "Global\"
661 prefix on systems supporting terminal services.
662 * wincap.cc: Set has_terminal_services capability throughout.
663 (wincap_2003): New global object representing Windows 2003 Server
664 capabilities.
665 (wincapc::init): Accomodate Windows 2003 Server.
666 * wincap.h (struct wincaps): Add has_terminal_services capability.
667
668 2003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
669
670 * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
671 * winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
672 * winsup/cygwin/cygwin.din: Add ftok, _ftok.
673 * winsup/cygwin/ipc.cc (ftok): Rework implementation.
674
675 2003-05-18 Joe Buehler <jhpb@hekimian.com>
676
677 * spawn.cc (spawn_guts): Show more of command line in strace output.
678
679 2003-05-15 Thomas Pfaff <tpfaff@gmx.net>
680
681 * thread.h (pthread::init_mainthread): Remove function parameter.
682 (MTinterface::Init): Ditto.
683 * thread.cc (MTinterface::Init): Remove function parameter.
684 Always initialize reent_key.
685 (pthread::init_mainthread): Remove function parameter.
686 (MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
687 * dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
688 pthread::init_mainthread.
689 Call pthread::init_mainthread only when not forked.
690
691 2003-05-15 Corinna Vinschen <corinna@vinschen.de>
692
693 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
694 Linux style values.
695
696 2003-05-13 Corinna Vinschen <corinna@vinschen.de>
697
698 * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
699
700 2003-05-12 Corinna Vinschen <corinna@vinschen.de>
701
702 * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
703 * fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
704 * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
705 * ipc.cc (ftok): Use stat64.
706 * syscalls.cc (_fstat64): Remove alias.
707 (_fstat): Ditto.
708 (_stat): Ditto.
709 (_fstat64_r): New function.
710 (_fstat_r): Ditto.
711 (_stat64_r): Ditto.
712 (stat_r): Ditto.
713 * crt0.o: New file, moved from newlib.
714 * include/sys/param.h: Ditto.
715 * include/sys/utime.h: Ditto.
716 * include/sys/utmp.h: Ditto.
717 * include/sys/dirent.h: Ditto. Expose different struct dirent,
718 dependening of the environment.
719
720 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
721
722 Replace ino_t by __ino64_t throughout.
723
724 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
725
726 * include/cygwin/types.h: Add key_t typedef.
727
728 2003-05-10 Christopher Faylor <cgf@redhat.com>
729
730 * dir.cc (readdir): Fill out new old_d_ino field.
731 * fhandler.h (fhandler_base::namehash): Define as ino_t.
732 (fhandler_base::get_namehash): Ditto.
733 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
734 new 64 bit st_ino.
735 * fhandler_socket.cc (fhandler_socket::fstat): Ditto.
736 * path.cc (hash_path_name): Return ino_t.
737 * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
738 * winsup.h (hash_path_name): Declare as returning ino_t.
739 * include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
740 (__stat64): Use 64 bit st_ino.
741 * include/cygwin/types.h (__ino64_t): Define.
742 (__ino32_t): Ditto.
743 (ino_t): Define appropriately.
744
745 2003-05-10 Corinna Vinschen <corinna@vinschen.de>
746
747 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
748 leading underscore.
749 * cygwin.din: Ditto.
750 * include/cygwin/version.h: Bump API minor number.
751
752 2003-05-09 Corinna Vinschen <corinna@vinschen.de>
753
754 * include/cygwin/config.h: New file.
755
756 2003-05-09 Christopher Faylor <cgf@redhat.com>
757
758 * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
759 completion over waiting for signal delivery.
760
761 2003-05-06 Thomas Pfaff <tpfaff@gmx.net>
762
763 * signal.cc (nanosleep): Do not wait twice for signal arrival.
764
765 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
766
767 * include/cygwin/types.h: Fix erroneous definition of ino_t from
768 2003-04-28.
769
770 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
771
772 * syscalls.cc (chown_worker): Allow chown'ing of socket files.
773
774 2003-04-30 Thomas Pfaff <tpfaff@gmx.net>
775
776 * Makefile.in: Revert patch from 2003-04-17.
777
778 2003-04-28 Brian Ford <ford@vss.fsi.com>
779
780 * profil.h (PROFADDR): Prevent overflow when text segments are larger
781 than 256k.
782 * profil.c (profthr_func): Raise thread priority for more accurate
783 sampling.
784
785 2003-04-26 Christopher Faylor <cgf@redhat.com>
786
787 * path.cc (hash_path_name): Use ino_t as type.
788
789 2003-04-26 Christopher Faylor <cgf@redhat.com>
790
791 * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
792 2003-04-23.
793
794 2003-04-25 Corinna Vinschen <corinna@vinschen.de>
795
796 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
797 to allow standalone usage (autoconf).
798
799 2003-04-23 Christopher Faylor <cgf@redhat.com>
800
801 * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
802 sense throughout.
803
804 2003-04-22 Christopher Faylor <cgf@redhat.com>
805
806 * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
807 called for successful non-blocking pipe reads.
808
809 2003-04-22 Corinna Vinschen <corinna@vinschen.de>
810
811 * include/inttypes.h: New file.
812 * include/stdint.h: New file.
813 * include/cygwin/in.h: Include stdint.h instead of sys/types.h.
814 * include/cygwin/types.h: Include stdint.h. Remove typedefs for
815 intN_t and uintN_t since these are defined in stdint.h now.
816
817 2003-04-21 Christopher Faylor <cgf@redhat.com>
818
819 * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
820 minor number to 0. Bump API minor number.
821
822 2003-04-20 Corinna Vinschen <corinna@vinschen.de>
823
824 * autoload.cc (CreateWindowStationA): Add.
825 (SetProcessWindowStation): Add.
826
827 2003-04-19 Christopher Faylor <cgf@redhat.com>
828
829 * wincap.h (wincaps:pty_needs_alloc_console): New element.
830 (wincapc:pty_needs_alloc_console): New function.
831 * wincap.cc: Add pty_needs_alloc_console throughout.
832 * fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
833 console on first pty allocation.
834
835 2003-04-18 Christopher Faylor <cgf@redhat.com>
836
837 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
838 whenever a pty is allocated.
839
840 2003-04-18 Christopher Faylor <cgf@redhat.com>
841
842 * Makefile.in: Use ${nostdlib} variable.
843
844 2003-04-18 Diego Biurrun <diego@biurrun.de>
845
846 * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
847 id" string to "vendor_id" to conform with Linux systems.
848
849 2003-04-17 Christopher Faylor <cgf@redhat.com>
850
851 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
852
853 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
854
855 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
856 * autoload.cc (LoadDLLprime): Rename std_dll_init to
857 _std_dll_init.
858 (std_dll_init): Remove name mangling prototype. Add attributes
859 used and noinline.
860 (wsock_init): Ditto.
861 Change wsock_init to _wsock_init in wsock32 and ws2_32
862 LoadDLLprime.
863 * exceptions.cc (unused_sig_wrapper): Remove prototype. Add
864 attributes used and noinline.
865 * pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
866 (pwdgrp (__group32 *&)): Ditto.
867 * grp.cc (pwdgrp (passwd *&)): Outline constructor.
868 (pwdgrp (__group32 *&)): Ditto.
869
870 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
871
872 * thread.h (pthread::equal): New static method.
873 * thread.cc: Rename pthread_equal to pthread::equal throughout.
874 (pthread_equal): Use pthread::equal to compare threads ids.
875
876 2003-04-15 Christopher Faylor <cgf@redhat.com>
877
878 * termios.cc (setspeed): New function.
879 (cfsetospeed): Use setspeed to set speed.
880 (cfsetispeed): Use setspeed to set speed.
881
882 2003-04-15 Chris January <chris@atomice.net>
883
884 * autoload.cc: Add load statement for UuidCreate, and
885 UuidCreateSequential.
886 * cpuid.h: New file.
887 * cygwin.din: Export gethostid.
888 * fhandler_proc.cc (cpuid): Move to cpuid.h.
889 (can_set_flag): Move to cpuid.h.
890 * syscalls.cc (gethostid): New function.
891 * version.h: Bump api minor version number to 83.
892
893 2003-04-15 Thomas Pfaff <tpfaff@gmx.net>
894
895 * thread.h (pthread_rwlock::release): New method.
896 * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
897 threads.
898 (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
899 cancelation.
900 (pthread_rwlock::wrlock_cleanup): Ditto.
901
902 2003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
903
904 * mkvers.sh: Prefix day with 0 in date only when day < 10.
905
906 2003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
907
908 * security.cc (get_info_from_sd): New function.
909 (get_nt_attribute): Only call read_sd and get_info_from_sd.
910 Return void.
911 (get_file_attribute): Move sd error handling to get_info_from_sd.
912 and symlink handling to fhandler_disk_file::fstat_helper.
913 (get_nt_object_attribute): Only call read_sd and get_info_from_sd.
914 Return void.
915 (get_object_attribute): Remove symlink handling and simply return -1
916 when ntsec is off.
917 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
918 symlinks set the attribute, call get_file_attribute to get the ids
919 and return. In the normal case call get_file_attribute with the
920 addresses of the buffer ids and do not recheck if the file is a socket.
921
922 2003-04-10 Christopher Faylor <cgf@redhat.com>
923
924 * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
925 (cygthread::simplestub): Initialize stack pointer.
926 (cygthread::terminate_thread): Account for possibility that stack
927 pointer has not been set. Issue warnings for unusual conditions.
928
929 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
930
931 * regex/regex.h: Define regoff_t as _off_t.
932 * regex/regex2.h: Ditto.
933
934 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
935
936 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
937 * include/cygwin/version.h: Bump API minor number.
938
939 2003-04-10 Christopher Faylor <cgf@redhat.com>
940
941 * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
942 * cygthread.cc: Ditto.
943 (cygthread::stub): Don't initialize already initialized events.
944 (cygthread::freerange): Don't create thread here.
945 (cygthread::cygthread): Create thread here. Die if thread not created.
946 (cygthread::operator new): Simplify. Just grab a thread structure from
947 the pool. Don't try to start the thread.
948 (cygthread::terminate_thread): Don't close event handles. Just reuse
949 them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe uehler).
950
951 2003-04-08 Bob Cassels <bcassels@abinitio.com>
952
953 * fhandler_console.cc (fhandler_console::read) Handle certain key up
954 events, to allow pasting accented characters and typing them using the
955 "alt + numerics" sequences.
956
957 2003-04-07 Christopher Faylor <cgf@redhat.com>
958
959 * include/limits.h (IOV_MAX): Set to a number which is small enough to
960 use in an array.
961
962 2003-04-04 Christopher Faylor <cgf@redhat.com>
963
964 * cygthread.h (cygthread::avail): Make LONG for easier use with
965 Interlocked* functions.
966 * cygthread.cc (cygthread::init): Eliminate unneeded muto.
967 (cygthread::operator new): Don't lock. Instead change use of avail
968 variable into tri-state: available (1), not available (-1),
969 uninitialized (0).
970 (cygthread::terminate_thread): Set avail to uninitialized.
971 (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
972 unless signalled.
973
974 2003-04-04 Christopher Faylor <cgf@redhat.com>
975
976 * cygthread.cc (cygthread::operator new): Be more defensive when messing with
977 threads that are marked "unavailable".
978
979 2003-04-03 Christopher Faylor <cgf@redhat.com>
980
981 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
982
983 2003-04-03 Corinna Vinschen <corinna@vinschen.de>
984
985 * external.cc (check_ntsec): Return general ntsec state on NULL
986 filename. Check wincap.is_security() additionally.
987
988 2003-04-02 Christopher Faylor <cgf@redhat.com>
989
990 * Makefile.in (EXTRA_OFILES): Remove debugging object.
991
992 2003-04-02 Jason Tishler <jason@tishler.net>
993 Christopher Faylor <cgf@redhat.com>
994
995 * external.cc (check_ntsec): New function.
996 (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
997 from applications.
998 * include/cygwin/version.h: Bump API minor number.
999 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
1000
1001 2003-04-02 Christopher Faylor <cgf@redhat.com>
1002
1003 * cygthread.cc (cygthread::new): Add more defensive debugging.
1004
1005 2003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
1006
1007 * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
1008 from the current effective ids.
1009 * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
1010 by fhandler_base::fstat.
1011 * security.cc (get_nt_attribute): Do not test wincap.has_security ().
1012 (get_nt_object_attribute): Ditto.
1013 (get_file_attribute): Add test for wincap.has_security ().
1014 (get_object_attribute): Ditto.
1015
1016 2003-04-01 Corinna Vinschen <corinna@vinschen.de>
1017
1018 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
1019 throughout.
1020 * fhandler.cc: Ditto.
1021 * fhandler.h: Ditto.
1022 * fhandler_clipboard.cc: Ditto.
1023 * fhandler_disk_file.cc: Ditto.
1024 * fhandler_dsp.cc: Ditto.
1025 * fhandler_floppy.cc: Ditto.
1026 * fhandler_mem.cc: Ditto.
1027 * fhandler_proc.cc: Ditto.
1028 * fhandler_process.cc: Ditto.
1029 * fhandler_random.cc: Ditto.
1030 * fhandler_registry.cc: Ditto.
1031 * fhandler_tape.cc: Ditto.
1032 * fhandler_termios.cc: Ditto.
1033 * fhandler_virtual.cc: Ditto.
1034 * fhandler_zero.cc: Ditto.
1035 * mmap.cc: Ditto.
1036 * pipe.cc: Ditto.
1037 * syscalls.cc: Ditto.
1038 * winsup.h: Ditto.
1039 * include/cygwin/stat.h: Ditto.
1040 * include/cygwin/types.h: Ditto. Remove definition of __off32_t
1041 and __off64_t.
1042
1043 2003-03-31 Christopher Faylor <cgf@redhat.com>
1044
1045 * exceptions.cc (setup_handler): Make sure winapi lock is released when
1046 exiting loop.
1047
1048 2003-03-30 Christopher Faylor <cgf@redhat.com>
1049
1050 * include/cygwin/fs.h: Remove unneeded include.
1051 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
1052
1053 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
1054
1055 * syscalls.cc (login): Fix comment.
1056 (logout): Ditto.
1057
1058 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
1059
1060 * syscalls.cc: Slightly cleanup all utmp functions.
1061 (login): Use mutex to secure against concurrent access to wtmp file.
1062 (logout): Rewrite using POSIX calls.
1063 (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
1064 in subsequent functions.
1065 (utmp_readonly): New variable, indicating utmp file open for reading
1066 only.
1067 (internal_setutent): New function implementing setutent().
1068 (setutent): Call internal_setutent now.
1069 (endutent): Reset utmp_readonly.
1070 (getutent): Return immediately if utmp file can't be opened.
1071 (getutid): Ditto.
1072 (getutline): Ditto.
1073 (pututline): Ditto. Use mutex to secure against concurrent access to
1074 utmp file.
1075
1076 2003-03-28 Christopher Faylor <cgf@redhat.com>
1077
1078 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
1079 * configure.in: Remove EXE_LDFLAGS.
1080 * configure: Regenerate.
1081
1082 2003-03-28 Christopher Faylor <cgf@redhat.com>
1083
1084 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
1085 * external.cc (cygwin_internal): Define as unsigned long.
1086
1087 2003-03-27 Christopher Faylor <cgf@redhat.com>
1088
1089 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
1090 conditional.
1091
1092 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1093
1094 * thread.cc: Change 1==foo equations to foo==1 throughout.
1095
1096 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1097
1098 * thread.h: Change class names, methods, members and local vars
1099 according to the GNU coding style.
1100 * thread.cc: Ditto.
1101 * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
1102 pthread::init_mainthread.
1103 * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
1104 call to pthread::is_good_object.
1105
1106 2003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
1107
1108 * autoload.cc: Add RegGetKeySecurity().
1109 * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
1110 performance.
1111
1112 2003-03-25 Christopher Faylor <cgf@redhat.com>
1113 Joe Buehler <jhpb@draco.hekimian.com>
1114
1115 * fork.cc (fork_parent): Don't copy signals from parent to child here.
1116 * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
1117 here.
1118
1119 2003-03-23 Thomas Pfaff <tpfaff@gmx.net>
1120
1121 * thread.h (class List): Move inline code inside class declaration.
1122 (List::forEach): Change callback parameter to template class member
1123 function pointer.
1124 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
1125 to fixup keys.
1126 (pthread_keys::fixup_after_fork): Ditto.
1127 (pthread_keys::runAllDestructors): Ditto.
1128 (pthread_key::saveAKey): Remove.
1129 (pthread_key::restoreAKey): Ditto.
1130 (pthread_key::destroyAKey): Ditto.
1131 (pthread_key::run_destructor): Rename to runDestructor.
1132 (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
1133 to fixup mutexes after a fork.
1134 (pthread_mutex::FixupAfterFork): New method.
1135 (pthread_mutex::mutexes): New member.
1136 (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
1137 to fixup conds after a fork.
1138 (pthread_cond::FixupAfterFork): New method.
1139 (pthread_cond::conds): New member.
1140 (pthread_rwlock::fixup_after_fork): Change to inline. Use
1141 List::forEach to fixup rwlocks after a fork.
1142 (pthread_rwlock::FixupAfterFork): New method.
1143 (pthread_rwlock::rwlocks): New member.
1144 (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
1145 fixup mutexes after a fork.
1146 (semaphore::FixupAfterFork): New method.
1147 (semaphore::semaphores): New member.
1148 (MTinterface::mutexs): Remove.
1149 (MTinterface::conds): Ditto.
1150 (MTinterface::rwlocks): Ditto.
1151 (MTinterface::semaphores): Ditto.
1152 (pthread_equal): Add extern "C".
1153 (pthread_mutex_lock): Ditto.
1154
1155 * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
1156 calls for pthread objects.
1157 (semaphore::conds): Instantiate.
1158 (pthread_cond::pthread_cond): Use List::Insert rather than custom list
1159 code.
1160 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
1161 code.
1162 (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
1163 (pthread_rwlock::rwlocks): Instantiate.
1164 (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
1165 list code.
1166 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
1167 list code.
1168 (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
1169 (pthread_key::saveAKey): Remove.
1170 (pthread_key::fixup_before_fork): Ditto.
1171 (pthread_key::restoreAKey): Ditto.
1172 (pthread_key::fixup_after_fork): Ditto.
1173 (pthread_key::destroyAKey): Ditto.
1174 (pthread_key::runAllDestructors): Ditto.
1175 (pthread_key::run_destructor): Rename to runDestructor.
1176 (pthread_mutex::mutexes): Instantiate.
1177 (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
1178 list code.
1179 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
1180 list code.
1181 (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
1182 (semaphore::conds): Instantiate.
1183 (semaphore::semaphore): Use List::Insert rather than custom list code.
1184 (semaphores::~semaphore): Use List::Remove rather than custom list
1185 code.
1186 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
1187
1188 2003-03-22 Christopher Faylor <cgf@redhat.com>
1189
1190 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
1191 exist.
1192
1193 2003-03-22 Christopher Faylor <cgf@redhat.com>
1194
1195 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
1196 called. Fix typo in debugging output.
1197
1198 2003-03-21 Christopher Faylor <cgf@redhat.com>
1199
1200 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
1201 necessary for newer versions of bash.
1202
1203 2003-03-20 Corinna Vinschen <corinna@vinschen.de>
1204
1205 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
1206 SIGPIPE handling to connection oriented sockets. Add comment.
1207
1208 2003-03-19 Christopher Faylor <cgf@redhat.com>
1209
1210 * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
1211 * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
1212 definition. Don't reset signal handlers after spawm. Just treat like
1213 fork/exec.
1214 * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
1215 signal_fixup_after_exec.
1216 * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
1217 Ditto for resetting of arguments.
1218
1219 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1220
1221 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
1222 throughout.
1223
1224 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1225
1226 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
1227 wrong usage of S_IFDIR.
1228 * security.cc (get_attribute_from_acl): Ditto.
1229 (get_file_attribute): Fix wrong usage of S_IFLNK.
1230 (get_object_attribute): Ditto.
1231 (alloc_sd): Fix wrong usage of S_IFDIR.
1232 * syscalls.cc (chmod): Allow chmod'ing of socket files.
1233
1234 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1235
1236 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
1237 Define.
1238 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
1239 instead of numerical constants.
1240 (g_stat): Ditto.
1241
1242 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1243
1244 * pthread.cc (pthread_attr_init): Remove
1245 (pthread_attr_destroy): Ditto.
1246 (pthread_attr_setdetachstate): Ditto.
1247 (pthread_attr_getdetachstate): Ditto.
1248 (pthread_attr_setstacksize): Ditto.
1249 (pthread_attr_getstacksize): Ditto.
1250 (pthread_attr_setinheritsched): Ditto.
1251 (pthread_attr_getinheritsched): Ditto.
1252 (pthread_attr_setschedparam): Ditto.
1253 (pthread_attr_getschedparam): Ditto.
1254 (pthread_attr_setschedpolicy): Ditto.
1255 (pthread_attr_getschedpolicy): Ditto.
1256 (pthread_attr_setscope): Ditto.
1257 (pthread_attr_getscope): Ditto.
1258 (pthread_attr_setstackaddr): Ditto.
1259 (pthread_attr_getstackaddr): Ditto.
1260 (pthread_key_create): Ditto.
1261 (pthread_key_delete): Ditto.
1262 (pthread_setspecific): Ditto.
1263 (pthread_getspecific): Ditto.
1264 (pthread_kill): Ditto.
1265 (pthread_sigmask): Ditto.
1266 (pthread_equal): Ditto.
1267 (pthread_mutex_lock): Ditto.
1268 (pthread_mutex_trylock): Ditto.
1269 (pthread_mutex_unlock): Ditto.
1270 (pthread_mutex_destroy): Ditto.
1271 (pthread_mutex_setprioceiling): Ditto.
1272 (pthread_mutex_getprioceiling): Ditto.
1273 (pthread_mutexattr_destroy): Ditto.
1274 (pthread_mutexattr_getprioceiling): Ditto.
1275 (pthread_mutexattr_getprotocol): Ditto.
1276 (pthread_mutexattr_getpshared): Ditto.
1277 (pthread_mutexattr_gettype): Ditto.
1278 (pthread_mutexattr_init): Ditto.
1279 (pthread_mutexattr_setprioceiling): Ditto.
1280 (pthread_mutexattr_setprotocol): Ditto.
1281 (pthread_mutexattr_setpshared): Ditto.
1282 (pthread_mutexattr_settype): Ditto.
1283 (pthread_cond_destroy): Ditto.
1284 (pthread_cond_signal): Ditto.
1285 (pthread_cond_broadcast): Ditto.
1286 (pthread_condattr_init): Ditto.
1287 (pthread_condattr_destroy): Ditto.
1288 (pthread_condattr_getpshared): Ditto.
1289 (pthread_condattr_setpshared): Ditto.
1290 (pthread_rwlock_destroy): Ditto.
1291 (pthread_rwlock_rdlock): Ditto.
1292 (pthread_rwlock_tryrdlock): Ditto.
1293 (pthread_rwlock_wrlock): Ditto.
1294 (pthread_rwlock_trywrlock): Ditto.
1295 (pthread_rwlock_unlock): Ditto.
1296 (pthread_rwlockattr_init): Ditto.
1297 (pthread_rwlockattr_getpshared): Ditto.
1298 (pthread_rwlockattr_setpshared): Ditto.
1299 (pthread_rwlockattr_destroy): Ditto.
1300 (pthread_getconcurrency): Ditto.
1301 (pthread_setconcurrency): Ditto.
1302 (pthread_getschedparam): Ditto.
1303 (pthread_setschedparam): Ditto.
1304
1305 * thread.h (__pthread_attr_init): Remove prototype.
1306 (__pthread_attr_destroy): Ditto.
1307 (__pthread_attr_setdetachstate): Ditto.
1308 (__pthread_attr_getdetachstate): Ditto.
1309 (__pthread_attr_setstacksize): Ditto.
1310 (__pthread_attr_getstacksize): Ditto.
1311 (__pthread_attr_setinheritsched): Ditto.
1312 (__pthread_attr_getinheritsched): Ditto.
1313 (__pthread_attr_setschedparam): Ditto.
1314 (__pthread_attr_getschedparam): Ditto.
1315 (__pthread_attr_setschedpolicy): Ditto.
1316 (__pthread_attr_getschedpolicy): Ditto.
1317 (__pthread_attr_setscope): Ditto.
1318 (__pthread_attr_getscope): Ditto.
1319 (__pthread_attr_setstackaddr): Ditto.
1320 (__pthread_attr_getstackaddr): Ditto.
1321 (__pthread_key_create): Ditto.
1322 (__pthread_key_delete): Ditto.
1323 (__pthread_setspecific): Ditto.
1324 (__pthread_getspecific): Ditto.
1325 (__pthread_kill): Ditto.
1326 (__pthread_sigmask): Ditto.
1327 (__pthread_equal): Ditto.
1328 (__pthread_mutex_lock): Ditto.
1329 (__pthread_mutex_trylock): Ditto.
1330 (__pthread_mutex_unlock): Ditto.
1331 (__pthread_mutex_destroy): Ditto.
1332 (__pthread_mutex_setprioceiling): Ditto.
1333 (__pthread_mutex_getprioceiling): Ditto.
1334 (__pthread_mutexattr_destroy): Ditto.
1335 (__pthread_mutexattr_getprioceiling): Ditto.
1336 (__pthread_mutexattr_getprotocol): Ditto.
1337 (__pthread_mutexattr_getpshared): Ditto.
1338 (__pthread_mutexattr_gettype): Ditto.
1339 (__pthread_mutexattr_init): Ditto.
1340 (__pthread_mutexattr_setprioceiling): Ditto.
1341 (__pthread_mutexattr_setprotocol): Ditto.
1342 (__pthread_mutexattr_setpshared): Ditto.
1343 (__pthread_mutexattr_settype): Ditto.
1344 (__pthread_cond_destroy): Ditto.
1345 (__pthread_cond_signal): Ditto.
1346 (__pthread_cond_broadcast): Ditto.
1347 (__pthread_condattr_init): Ditto.
1348 (__pthread_condattr_destroy): Ditto.
1349 (__pthread_condattr_getpshared): Ditto.
1350 (__pthread_condattr_setpshared): Ditto.
1351 (__pthread_rwlock_destroy): Ditto.
1352 (__pthread_rwlock_rdlock): Ditto.
1353 (__pthread_rwlock_tryrdlock): Ditto.
1354 (__pthread_rwlock_wrlock): Ditto.
1355 (__pthread_rwlock_trywrlock): Ditto.
1356 (__pthread_rwlock_unlock): Ditto.
1357 (__pthread_rwlockattr_init): Ditto.
1358 (__pthread_rwlockattr_getpshared): Ditto.
1359 (__pthread_rwlockattr_setpshared): Ditto.
1360 (__pthread_rwlockattr_destroy): Ditto.
1361 (__pthread_getconcurrency): Ditto.
1362 (__pthread_setconcurrency): Ditto.
1363 (__pthread_getschedparam): Ditto.
1364 (__pthread_setschedparam): Ditto.
1365
1366 * thread.cc: Rename __pthread_equal to pthread_equal throughout.
1367 Change pthread_self parameter appropriate.
1368 (__pthread_attr_init): Remove __ prefix. Change to extern "C".
1369 (__pthread_attr_destroy): Ditto.
1370 (__pthread_attr_setdetachstate): Ditto.
1371 (__pthread_attr_getdetachstate): Ditto.
1372 (__pthread_attr_setstacksize): Ditto.
1373 (__pthread_attr_getstacksize): Ditto.
1374 (__pthread_attr_setinheritsched): Ditto.
1375 (__pthread_attr_getinheritsched): Ditto.
1376 (__pthread_attr_setschedparam): Ditto.
1377 (__pthread_attr_getschedparam): Ditto.
1378 (__pthread_attr_setschedpolicy): Ditto.
1379 (__pthread_attr_getschedpolicy): Ditto.
1380 (__pthread_attr_setscope): Ditto.
1381 (__pthread_attr_getscope): Ditto.
1382 (__pthread_attr_setstackaddr): Ditto.
1383 (__pthread_attr_getstackaddr): Ditto.
1384 (__pthread_key_create): Ditto.
1385 (__pthread_key_delete): Ditto.
1386 (__pthread_setspecific): Ditto.
1387 (__pthread_getspecific): Ditto.
1388 (__pthread_kill): Ditto.
1389 (__pthread_sigmask): Ditto.
1390 (__pthread_equal): Ditto.
1391 (__pthread_mutex_lock): Ditto.
1392 (__pthread_mutex_trylock): Ditto.
1393 (__pthread_mutex_unlock): Ditto.
1394 (__pthread_mutex_destroy): Ditto.
1395 (__pthread_mutex_setprioceiling): Ditto.
1396 (__pthread_mutex_getprioceiling): Ditto.
1397 (__pthread_mutexattr_destroy): Ditto.
1398 (__pthread_mutexattr_getprioceiling): Ditto.
1399 (__pthread_mutexattr_getprotocol): Ditto.
1400 (__pthread_mutexattr_getpshared): Ditto.
1401 (__pthread_mutexattr_gettype): Ditto.
1402 (__pthread_mutexattr_init): Ditto.
1403 (__pthread_mutexattr_setprioceiling): Ditto.
1404 (__pthread_mutexattr_setprotocol): Ditto.
1405 (__pthread_mutexattr_setpshared): Ditto.
1406 (__pthread_mutexattr_settype): Ditto.
1407 (__pthread_cond_destroy): Ditto.
1408 (__pthread_cond_signal): Ditto.
1409 (__pthread_cond_broadcast): Ditto.
1410 (__pthread_condattr_init): Ditto.
1411 (__pthread_condattr_destroy): Ditto.
1412 (__pthread_condattr_getpshared): Ditto.
1413 (__pthread_condattr_setpshared): Ditto.
1414 (__pthread_rwlock_destroy): Ditto.
1415 (__pthread_rwlock_rdlock): Ditto.
1416 (__pthread_rwlock_tryrdlock): Ditto.
1417 (__pthread_rwlock_wrlock): Ditto.
1418 (__pthread_rwlock_trywrlock): Ditto.
1419 (__pthread_rwlock_unlock): Ditto.
1420 (__pthread_rwlockattr_init): Ditto.
1421 (__pthread_rwlockattr_getpshared): Ditto.
1422 (__pthread_rwlockattr_setpshared): Ditto.
1423 (__pthread_rwlockattr_destroy): Ditto.
1424 (__pthread_getconcurrency): Ditto.
1425 (__pthread_setconcurrency): Ditto.
1426 (__pthread_getschedparam): Ditto.
1427 (__pthread_setschedparam): Ditto.
1428
1429 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1430
1431 * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
1432 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1433 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1434 pthread_rwlock_unlock, pthread_rwlockattr_init,
1435 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1436 and pthread_rwlockattr_destroy.
1437 * include/cygwin/version.h: Bump API minor number.
1438 * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
1439 reasonable value.
1440 Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
1441 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1442 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1443 pthread_rwlock_unlock, pthread_rwlockattr_init,
1444 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1445 and pthread_rwlockattr_destroy.
1446 * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
1447 (PTHREAD_RWLOCK_MAGIC): New define.
1448 (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
1449 (pthread_rwlockattr): New class.
1450 (pthread_rwlock): Ditto.
1451 (MTinterface::rwlocks): New member.
1452 (MTinterface::MTinterface): Initialize rwlocks.
1453 Add prototypes for __pthread_rwlock_destroy,
1454 __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
1455 __pthread_rwlock_unlock, __pthread_rwlockattr_init,
1456 __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
1457 and __pthread_rwlockattr_destroy.
1458 * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
1459 (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
1460 (pthread_rwlockattr::isGoodObject): Implement.
1461 (pthread_rwlockattr::pthread_rwlockattr): Ditto.
1462 (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
1463 (pthread_rwlock::initMutex): Ditto.
1464 (pthread_rwlock::pthread_rwlock): Ditto.
1465 (pthread_rwlock::~pthread_rwlock): Ditto.
1466 (pthread_rwlock::RdLock): Ditto.
1467 (pthread_rwlock::TryRdLock): Ditto.
1468 (pthread_rwlock::WrLock): Ditto.
1469 (pthread_rwlock::TryWrLock): Ditto.
1470 (pthread_rwlock::UnLock): Ditto.
1471 (pthread_rwlock::addReader): Ditto.
1472 (pthread_rwlock::removeReader): Ditto.
1473 (pthread_rwlock::lookupReader): Ditto.
1474 (pthread_rwlock::RdLockCleanup): Ditto.
1475 (pthread_rwlock::WrLockCleanup): Ditto.
1476 (pthread_rwlock::fixup_after_fork): Ditto.
1477 (pthread_rwlock::isGoodObject): Ditto.
1478 (pthread_rwlock::isGoodInitializer): Ditto.
1479 (pthread_rwlock::isGoodInitializerOrObject): Ditto.
1480 (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
1481 (__pthread_rwlock_destroy): Ditto.
1482 (pthread_rwlock::init): Ditto.
1483 (__pthread_rwlock_rdlock): Ditto.
1484 (__pthread_rwlock_tryrdlock): Ditto.
1485 (__pthread_rwlock_wrlock): Ditto.
1486 (__pthread_rwlock_trywrlock): Ditto.
1487
1488 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1489
1490 * thread.h (pthread_cond::ExitingWait): Remove.
1491 (pthread_cond::mutex): Ditto.
1492 (pthread_cond::cond_access): Ditto.
1493 (pthread_cond::win32_obj_id): Ditto.
1494 (pthread_cond::TimedWait): Ditto.
1495 (pthread_cond::BroadCast): Ditto.
1496 (pthread_cond::Signal): Ditto.
1497 (pthread_cond::waiting): Change type to unsigned long.
1498 (pthread_cond::pending): New member.
1499 (pthread_cond::semWait): Ditto.
1500 (pthread_cond::mtxIn): Ditto.
1501 (pthread_cond::mtxOut): Ditto.
1502 (pthread_cond::mtxCond): Ditto.
1503 (pthread_cond::UnBlock): New method.
1504 (pthread_cond::Wait): Ditto.
1505 * thread.cc: Update list of cancellation points.
1506 (pthread_cond::pthread_cond): Rewrite.
1507 (pthread_cond::~pthread_cond): Ditto.
1508 (pthread_cond::TimedWait): Remove.
1509 (pthread_cond::BroadCast): Ditto.
1510 (pthread_cond::Signal): Ditto.
1511 (pthread_cond::UnBlock): Implement.
1512 (pthread_cond::Wait): Ditto.
1513 (pthread_cond::fixup_after_fork): Rewrite.
1514 (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
1515 conditional.
1516 (__pthread_cond_broadcast): Just return 0 if the condition is
1517 not initialized. Call pthread_cond::UnBlock to release blocked
1518 threads.
1519 (__pthread_cond_signal): Ditto.
1520 (__pthread_cond__dowait): Rewrite.
1521 (pthread_cond_timedwait): Add pthread_testcancel call. Fix
1522 waitlength calculation.
1523 (pthread_cond_wait): Add pthread_testcancel call.
1524
1525 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1526
1527 * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
1528 * thread.cc: Remove errno.h include.
1529 (pthread::precreate): Change internal mutex type to normal.
1530 (pthread_mutex::canBeUnlocked): Implement.
1531 (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
1532 (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
1533 Change lock_counter logic. Update SetOwner call.
1534 (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
1535 Change lock_counter logic. Update SetOwner call.
1536 (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
1537 Change lock_counter logic.
1538 (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
1539 (pthread_mutex::SetOwner): Move to thread.h as inline.
1540 (pthread_mutex::LockRecursive): Ditto.
1541 (pthread_mutex::fixup_after_fork): Change lock_counter logic.
1542 (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
1543 types check.
1544 * thread.h: Include errno.h and limits.h.
1545 (MUTEX_LOCK_COUNTER_INITIAL): Remove.
1546 (MUTEX_OWNER_ANONYMOUS): New define.
1547 (pthread_mutex::canBeUnlocked): New static method.
1548 (pthread_mutex::lock_counter): Change type to unsigned long.
1549 (pthread_mutex::GetPthreadSelf): New method.
1550 (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
1551 (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
1552 (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
1553 (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
1554 (pthread_mutex::SetOwner): Moved from thread.cc as inline.
1555 (pthread_mutex::LockRecursive): Ditto.
1556 (pthread_mutex::_Lock): New method.
1557 (pthread_mutex::_TryLock): New method.
1558 (pthread_mutex::_UnLock): New method.
1559 (pthread_mutex::_Destroy): New method.
1560
1561 2003-03-18 Christopher January <chris@atomice.net>
1562
1563 * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
1564 only on Windows NT. Read CPU Mhz value only on NT. Revert previous
1565 change so cpuid instruction is called even on non-NT systems.
1566
1567 2003-03-17 Corinna Vinschen <corinna@vinschen.de>
1568
1569 * glob.c (g_lstat): Change API minor test to match API minor number
1570 change in previous patch.
1571 (g_stat): Ditto.
1572
1573 2003-03-17 Christopher Faylor <cgf@redhat.com>
1574
1575 * include/cygwin/version.h: Reorganize last two api versions so that
1576 btowc and trunc exports show up before previous bump since there has
1577 been no exported version of the DLL with the 64 bit changes yet but
1578 1.3.22 will have the btowc and trunc.
1579
1580 2003-03-17 Christopher Faylor <cgf@redhat.com>
1581
1582 * cygwin.din: Export btowc, trunc.
1583 * include/cygwin/version.h: Reflect new exports.
1584 * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
1585 * syscalls.cc (_fstat): Ditto.
1586
1587 2003-03-16 Christopher Faylor <cgf@redhat.com>
1588
1589 * fhandler_console.cc (fhandler_console::close): Correct check for
1590 current tty. Add debugging output when console is freed.
1591 (set_console_state_for_spawn): Add debugging output.
1592 * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
1593 open flag when vforking.
1594 * sigproc.cc (sigproc_terminate): Fix debugging output.
1595 * spawn.cc (handle): Eliminate second argument.
1596 (spawn_guts): Reflect elimination of argument change to handle.
1597 * syscalls.cc (setsid): Add debugging output when console is freed.
1598
1599 2003-03-14 Christopher Faylor <cgf@redhat.com>
1600
1601 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
1602 Win9x.
1603
1604 2003-03-13 Christopher Faylor <cgf@redhat.com>
1605
1606 * include/cygwin/version.h: Bump DLL minor number to 23.
1607
1608 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
1609
1610 * autoload.cc (IsProcessorFeaturePresent): Add.
1611 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
1612
1613 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
1614
1615 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
1616
1617 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
1618
1619 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
1620 (cygwin_rexec): Ditto.
1621
1622 2003-03-13 Christopher Faylor <cgf@redhat.com>
1623
1624 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
1625 output.
1626
1627 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
1628
1629 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
1630
1631 * fhandler_socket.cc (fhandler_socket::dup): Don't call
1632 fhandler_base::dup() but call DuplicateHandle directly instead to have
1633 control over socket inheritence.
1634
1635 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
1636
1637 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
1638 using WinSock2 socket duplication methods. Add comment.
1639
1640 2003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
1641
1642 * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
1643 Set io_handle to INVALID_SOCKET in case of failure.
1644 (fhandler_socket::dup): Return 0 if the io_handle is valid.
1645
1646 2003-03-10 Corinna Vinschen <corinna@vinschen.de>
1647
1648 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
1649 * security.cc (alloc_sd): Ditto.
1650
1651 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
1652
1653 * winver.rc: Change Copyright hint to include 2003.
1654
1655 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
1656
1657 Switch to 32/64 datatypes:
1658 * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
1659 aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
1660 facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
1661 ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
1662 getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
1663 seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
1664 telldir truncate.
1665 (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
1666 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
1667 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
1668 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
1669 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
1670 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
1671 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
1672 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
1673 above.
1674 * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
1675 members to __uid32_t and __gid32_t.
1676 * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
1677 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
1678 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
1679 _fstat64 ftello64 _lseek64 mknod32 _open64.
1680 * glob.c: Include perprocess.h.
1681 (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
1682 getuid.
1683 (g_lstat): Check for applications API version to call the appropriate
1684 typed gl_lstat function.
1685 (g_stat): Ditto for gl_stat.
1686 * shm.cc (client_request_shm::client_request_shm): Call geteuid32
1687 and getegid32 instead of geteuid and getegid throughout.
1688 * syscalls.cc (_open64): New alias for open.
1689 (_lseek64): New alias for lseek64.
1690 (_fstat64): New alias for fseek64.
1691 (mknod32): New function.
1692 (mknod): Calls mknod32 now.
1693 * winsup.h: Make function declarations for getuid32, geteuid32,
1694 and getpwuid32 accessible for plain C sources. Add declarations
1695 for getegid32 and getpwnam.
1696 * include/cygwin/version.h: Bum API minor number to 78.
1697 * include/sys/cygwin.h: Guard C++ specific members of struct
1698 per_process against inclusion in plain C sources.
1699 * include/sys/mman.h (mman): Add guard to avoid type clash when
1700 compiling Cygwin.
1701
1702 2003-03-09 Christopher Faylor <cgf@redhat.com>
1703
1704 * include/cygwin/version.h: Bump DLL minor number to 22.
1705
1706 2003-03-09 Christopher Faylor <cgf@redhat.com>
1707
1708 Do some minor reformatting of 'extern "C"' use throughout.
1709
1710 2003-03-06 Christopher January <chris@atomice.net>
1711
1712 * autoload.cc (GetSystemTimes): Define new autoload function.
1713 * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
1714 (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
1715 cases.
1716 (format_proc_uptime): Use GetSystemTimes if available.
1717 (read_value): New macro.
1718 (print): New macro.
1719 (cpuid): New function.
1720 (can_set_flag): New function.
1721 (format_proc_cpuinfo): New function.
1722 (format_proc_partitions): New function.
1723
1724 2003-03-09 Christopher Faylor <cgf@redhat.com>
1725
1726 * syscalls.cc (unlink): Attempt to be more clever about setting
1727 attributes of file. Only open file in query mode to avoid having to
1728 mess with security stuff for reading.
1729
1730 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
1731
1732 * rmsym: Fix regular expression.
1733
1734 2003-03-09 Christopher Faylor <cgf@redhat.com>
1735
1736 * Makefile.in: Change from using new-* to cygwin0 for temporary
1737 targets.
1738
1739 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
1740
1741 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
1742
1743 2003-03-08 Christopher Faylor <cgf@redhat.com>
1744
1745 * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
1746 to delete files since this allows us to preserve the protection of hard
1747 linked files.
1748 (link): Generate full path for potentially recalculated .lnk target.
1749
1750 2003-03-08 Christopher Faylor <cgf@redhat.com>
1751
1752 Revert below changes regarding _pinfo::cmdline.
1753
1754 2003-03-08 Corinna Vinschen <corinna@vinschen.de>
1755
1756 * external.cc (cygwin_internal): Change n to __off64_t to match change
1757 of _pinfo::cmdline.
1758 * fhandler.h (class fhandler_virtual): Change filesize member to
1759 __off64_t.
1760 * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
1761 (format_proc_stat): Ditto.
1762 (format_proc_uptime): Ditto.
1763 * fhandler_process.cc (format_process_stat): Ditto.
1764 (format_process_status): Ditto.
1765 (format_process_statm): Ditto.
1766 * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
1767 * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
1768
1769 2003-03-07 Christopher Faylor <cgf@redhat.com>
1770
1771 * path.h (PATH_LNK): New enum val.
1772 (path_conv::is_lnk_symlink): New function. True if path represents
1773 .lnk style symlink.
1774 * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
1775 (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
1776 * syscalls.cc (unlink): Always remove readonly attribute from a symlink
1777 regardless of type.
1778 (link): (from Corinna Vinschen) Allow links to symlinks. Reset
1779 attributes on a symlink after successful link creation.
1780 (chmod): Use is_lnk_symlink where appropriate.
1781 (rename): Ditto.
1782
1783 2003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
1784
1785 * tty.cc (create_tty_master): Call GetComputerName instead of
1786 cygwin_gethostname. Set ut_id.
1787 * syscalls.cc (login): Call endutent.
1788 (setutent): Do not seek after a fresh open.
1789
1790 2003-03-07 Corinna Vinschen <corinna@vinschen.de>
1791
1792 * syscalls.cc (seteuid32): Fix formatting.
1793
1794 2003-03-04 Thomas Pfaff <tpfaff@gmx.net>
1795
1796 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
1797 prior to pthread objects.
1798
1799 2003-03-04 Jason Tishler <jason@tishler.net>
1800
1801 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
1802
1803 2003-03-03 Christopher Faylor <cgf@redhat.com>
1804
1805 * fhandler.h (fhandler_tty_slave::close): Declare new function.
1806 (fhandler_tty_slave::dup): Declare new function.
1807 (fhandler_tty_slave::fixup_after_function): Declare new function.
1808 * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
1809 fhandler_console::open_fhs when associated with a pty.
1810 (fhandler_tty_slave::close): Define new function. Decrement
1811 fhandler_console::open_fhs when associated with a pty.
1812 (fhandler_tty_slave::dup): Define new function. Increment
1813 fhandler_console::open_fhs when associated with a pty.
1814 (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
1815 fhandler_console::open_fhs when associated with a pty.
1816
1817 2003-03-03 Christopher Faylor <cgf@redhat.com>
1818
1819 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
1820 fhandler_console::open_fhs here.
1821 (fhandler_pty_slave::close): Ditto for close.
1822
1823 2003-03-02 Christopher Faylor <cgf@redhat.com>
1824
1825 * lib/getopt.c: Refresh from NetBSD sources.
1826
1827 2003-03-02 Christopher Faylor <cgf@redhat.com>
1828
1829 * fhandler_console.cc (fhandler_console::close): Don't decrement
1830 in use counter if in vfork fixup stage.
1831
1832 2003-03-02 Christopher Faylor <cgf@redhat.com>
1833
1834 * lib/getopt.c: Nuke use of unneeded BSDisms.
1835
1836 2003-03-02 Christopher Faylor <cgf@redhat.com>
1837
1838 * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
1839 if LoadLibraryEx fails.
1840 * dtable.cc (dtable::dec_console_fds): Eliminate.
1841 (dtable::release): Don't treat console specially.
1842 (dtable::build_fhandler): Ditto.
1843 * dtable.h (console_fds): Eliminate.
1844 (dtable::dec_console_fds): Eliminate.
1845 (dtable::inc_console_fds): Eliminate.
1846 * fhandler.h (fhandler_console::open_fhs): New static element.
1847 * fhandler_console.cc (fhandler_console::open): Increment open_fs.
1848 (fhandler_console::close): Call FreeConsole if no more open consoles
1849 and ctty is not associated with the console.
1850 * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
1851 (check_pty_fds): Eliminate definition.
1852 * winsup.h (check_pty_fds): Eliminate declaration.
1853
1854 2003-03-02 Christopher Faylor <cgf@redhat.com>
1855
1856 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
1857 LoadLibrary was ignored.
1858
1859 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
1860
1861 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
1862 file using Win32 calls.
1863
1864 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
1865
1866 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
1867 Win32 calls.
1868
1869 2003-02-28 Christopher Faylor <cgf@redhat.com>
1870
1871 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
1872 * dcrt0.cc (cygwin_atexit): New function.
1873 (cygwin_exit): Ditto.
1874
1875 2003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
1876
1877 * syscalls.cc (fstat64): Pass get_name () to pc.
1878 (access): Pass fn to stat_worker.
1879
1880 2003-03-27 Corinna Vinschen <corinna@vinschen.de>
1881
1882 * fhandler_socket.cc (class sock_event): New class managing Winsock
1883 events for interruptible socket calls.
1884 (fhandler_socket::connect): Move support for interruptible call to
1885 class sock_event. Use class object instead.
1886 (fhandler_socket::accept): Ditto. Remove useless casts.
1887
1888 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1889
1890 * fhandler_socket.cc (fhandler_socket::connect): Add support for
1891 an interruptable connect.
1892
1893 2003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
1894
1895 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
1896 if the call to set the primary group succeeds.
1897
1898 2003-02-27 Christopher Faylor <cgf@redhat.com>
1899
1900 * cygthread::detach: Improve error message.
1901
1902 2003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
1903
1904 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
1905
1906 2003-02-25 Corinna Vinschen <corinna@vinschen.de>
1907
1908 * mmap.cc (mmap64): Fix returned address by taking the granularity
1909 into account.
1910
1911 2003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
1912
1913 * syslog.cc (syslog): Do not unlock the file before closing it
1914 and remove debug_printf about stream errors.
1915
1916 2003-02-22 Christopher Faylor <cgf@redhat.com>
1917
1918 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
1919 # cygwin.din: Export mallinfo.
1920 # malloc_wrapper.cc (mallinfo): New function.
1921
1922 2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
1923
1924 * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
1925 pid as an unsigned decimal. On Win95 print a timestamp and attempt to
1926 lock the file up to four times in 3 ms.
1927
1928 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
1929
1930 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
1931 warning.
1932 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
1933 uid/gid of current process in case of open sockets.
1934
1935 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
1936
1937 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
1938 data on sockets to evaluate AF_LOCAL sockets correctly.
1939 (dtable::build_fhandler): Set unit number on sockets.
1940 * fhandler.h (fhandler_socket): Add unit number.
1941 (fhandler_socket::get_unit): New method.
1942 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
1943 number.
1944 (fhandler_socket::fstat): Reorganize to return more Linux-like
1945 values.
1946 * net.cc: include ctype.h.
1947 (fdsock): Set unit number when building fhandler.
1948 * path.cc (path_conv::check): Set device type to FH_SOCKET if file
1949 is a AF_UNIX socket.
1950 (get_devn): Evaluate unit for virtual socket devices.
1951 (win32_device_name): Set windows path for sockets to unix_path with
1952 just backslashes to keep the different names.
1953 * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
1954 for sockets.
1955 (stat_worker): Ditto.
1956
1957 2003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
1958
1959 * autoload.cc (AccessCheck): Add.
1960 (DuplicateToken): Add.
1961 * security.h (check_file_access): Declare.
1962 * syscalls.cc (access): Convert path to Windows, check existence
1963 and readonly attribute. Call check_file_access instead of acl_access.
1964 * security.cc (check_file_access): Create.
1965 * sec_acl (acl_access): Delete.
1966
1967 2003-02-19 Christopher Faylor <cgf@redhat.com>
1968
1969 * fhandler.cc (fhandler_base::open): Move some filesystem specific
1970 stuff.
1971 (fhandler_disk_file::open): Accept some filesystem specific stuff.
1972 * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
1973 (sig_send): Don't assume that signal thread is ready.
1974
1975 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
1976
1977 * wincap.h (wincap): Remove unnecessary definition of
1978 supports_sparse_files.
1979 * wincap.cc: Ditto.
1980
1981 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
1982
1983 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
1984 created by cygheap_fdnew constructor.
1985 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1986 * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
1987 creation of file descriptor behind blocking OS call.
1988 * net.cc (cygwin_socket): Ditto.
1989 (cygwin_rcmd): Ditto.
1990 (cygwin_rresvport): Ditto.
1991 (cygwin_rexec): Ditto.
1992 (socketpair): Ditto.
1993
1994 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
1995
1996 * autoload.cc (GetCompressedFileSize): Add.
1997 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
1998 st_blocks value from GetCompressedFileSize() if available.
1999
2000 2003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2001
2002 * wincap.h (wincaps::supports_sparse_files): New flag.
2003 (wincapc::supports_sparse_files): New method.
2004 * wincap.cc (wincap_unknown): Define value for the new flag.
2005 (wincap_95): Ditto.
2006 (wincap_95osr2): Ditto.
2007 (wincap_98): Ditto.
2008 (wincap_98se): Ditto.
2009 (wincap_me): Ditto.
2010 (wincap_nt3): Ditto.
2011 (wincap_nt4): Ditto.
2012 (wincap_nt4sp4): Ditto.
2013 (wincap_2000): Ditto.
2014 (wincap_xp): Ditto.
2015 * path.h (path_conv::fs_flags): New method.
2016 * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
2017 (fhandler_disk_file::open): Set newly created and truncated files as
2018 sparse on platforms that support it.
2019
2020 2003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
2021
2022 * grp.cc (internal_getgroups): Handle properly tokens with
2023 no groups. Fix bug introduced on 2003-02-04.
2024
2025 2003-02-16 Christopher Faylor <cgf@redhat.com>
2026
2027 * cygwin.din: Export all appropriate newlib libm functions. Sort.
2028 * include/cygwin/version.h: Bump API minor number.
2029
2030 2003-02-15 Christopher Faylor <cgf@redhat.com>
2031
2032 * cygwin.din: Export all appropriate newlib libc functions.
2033 * include/cygwin/version.h: Bump API minor number.
2034
2035 2003-02-14 Jason Tishler <jason@tishler.net>
2036
2037 * mmap.cc (mprotect): Add missing break.
2038
2039 2003-02-13 Christopher Faylor <cgf@redhat.com>
2040
2041 * exceptions.cc (try_to_debug): Don't reset priority when returning
2042 from non-waitloop call.
2043
2044 2003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2045 Christopher Faylor <cgf@redhat.com>
2046
2047 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
2048 for bell sound.
2049 * autoload.cc (MessageBeep): Add.
2050
2051 2003-02-13 Christopher Faylor <cgf@redhat.com>
2052
2053 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
2054
2055 2003-02-13 Christopher Faylor <cgf@redhat.com>
2056
2057 * environ.cc (environ_init): Use strechr.
2058
2059 2003-02-13 Christopher Faylor <cgf@redhat.com>
2060
2061 * include/cygwin/in.h (sockaddr_in): Fix typo.
2062
2063 2003-02-12 Christopher Faylor <cgf@redhat.com>
2064
2065 * path.h (path_conv): Reorganize slightly.
2066
2067 2003-02-12 Christopher Faylor <cgf@redhat.com>
2068
2069 * fhandler_tty.cc (process_input): Add sanity check to ensure that
2070 console typeahead is cleared on signal.
2071
2072 2003-02-12 Christopher Faylor <cgf@redhat.com>
2073
2074 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
2075 debugging?) code.
2076
2077 2003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
2078
2079 * include/cygwin/in.h (in_attr_t): Define new type.
2080 * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
2081 (inet_lnaof): Ditto.
2082 (inet_netof): Ditto.
2083 (inet_network): Ditto.
2084
2085 2003-02-10 Christopher Faylor <cgf@redhat.com>
2086
2087 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
2088 with ifdefs.
2089 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
2090 * security.cc (get_attribute_from_acl): Accept mode_t attribute.
2091 (get_nt_attribute): Ditto.
2092 (get_file_attribute): Ditto.
2093 (get_nt_object_attribute): Ditto.
2094 (get_object_attribute): Ditto.
2095 * security.h: Reflect above changes.
2096 * syscalls.cc (chown_worker): Change attrib to mode_t.
2097
2098 2003-02-08 Christopher Faylor <cgf@redhat.com>
2099
2100 * include/cygwin/version.h: Bump DLL minor number to 21.
2101
2102 2003-02-07 Christopher Faylor <cgf@redhat.com>
2103
2104 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
2105 changes.
2106
2107 2003-02-07 Corinna Vinschen <corinna@vinschen.de>
2108
2109 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
2110 parameter. Only protect pages actually unused currently. Do job
2111 of map_map() when initializing a map.
2112 (mmap_record::map_map): Reduce functionality for the reuse case
2113 of private anonymous mapping.
2114 (mmap_record::fixup_map): Format change.
2115 (list::add_record): Add offset and length parameter to call
2116 mmap_record::alloc_map() correctly.
2117 (mmap64): Rename `l' variable to `map_list'. Accomodate above changes.
2118 (munmap): Rename `l' variable to `map_list'.
2119 (msync): Ditto.
2120 (fhandler_disk_file::mmap): Streamline code.
2121 (mprotect): Ditto.
2122 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
2123
2124 2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2125 Christopher Faylor <cgf@redhat.com>
2126
2127 * exceptions.cc (try_to_debug): Set priority of current thread rather
2128 than the main thread. Make busy waiting loop less busy. Restore
2129 priority when function returns.
2130
2131 2003-02-07 Christopher Faylor <cgf@redhat.com>
2132
2133 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
2134
2135 2003-02-07 Christopher Faylor <cgf@redhat.com>
2136
2137 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
2138
2139 2003-02-06 Christopher Faylor <cgf@redhat.com>
2140
2141 * heap.cc (heap_init): Remove debugging code.
2142
2143 2003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
2144
2145 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
2146 declaration of is_grp_member.
2147 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
2148 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
2149 * grp.cc (pwdgrp::read_group): Change group name to provide better
2150 feedback.
2151 (getgrgid): Use gid16togid32.
2152 * sec_helper.cc (is_grp_member): Delete.
2153
2154 2003-02-05 Christopher Faylor <cgf@redhat.com>
2155
2156 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
2157 (conv_path_list_buf_size): Accommodate relative paths.
2158
2159 2003-02-05 Christopher Faylor <cgf@redhat.com>
2160
2161 * path.cc (etc::dir_changed): Fix debug printf.
2162
2163 2003-02-05 Corinna Vinschen <corinna@vinschen.de>
2164
2165 * sec_acl.cc (setacl): Move all permission settings to beginning of
2166 loop. Set default rights to same values as in alloc_sd(). Set DELETE
2167 for owner and default owner only if S_IWOTH is given.
2168
2169 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2170
2171 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
2172 wrapper function definitions. Replace call to the aclXYZ functions by
2173 calls aclXYZ32.
2174 (searchace): Change type of third argument to __uid32_t and use
2175 ILLEGAL_UID instead of -1;
2176 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
2177 for S_IWOTH. Replace -1 by ILLEGAL_UID.
2178 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
2179 In last else clause, suppress second call to ace_sid.get_id and use
2180 TRUE in first call. Replace EqualSid by ==.
2181 (acl_access): Call internal_getgroups in USER and GROUP cases.
2182 (acecmp: Define static.
2183 (acl32): Create from 16 bit type.
2184 (facl32): Ditto.
2185 (lacl32): Ditto.
2186 (aclcheck32): Ditto.
2187 (aclsort32): Ditto.
2188 (acltomode32): Ditto.
2189 (aclfrommode32): Ditto.
2190 (acltopbits32): Ditto.
2191 (aclfrompbits32): Ditto.
2192 (acltotext32): Ditto.
2193 (aclfromtext32): Ditto, and use strechr.
2194 (acl16to32): Create.
2195 (acl): Make it a wrapper function.
2196 (facl): Ditto.
2197 (lacl): Ditto.
2198 (aclcheck): Ditto.
2199 (aclsort): Ditto.
2200 (acltomode): Ditto.
2201 (aclfrommode): Ditto.
2202 (acltopbits): Ditto.
2203 (aclfrompbits): Ditto.
2204 (acltotext): Ditto.
2205 (aclfromtext): Ditto.
2206 * security.cc (write_sd): Call set_process_privilege and check
2207 ownership.
2208 (alloc_sd): Remove call to set_process_privilege and the owner check.
2209
2210 2003-02-05 Christopher Faylor <cgf@redhat.com>
2211
2212 * include/sys/cygwin.h: Use C-style comments.
2213
2214 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2215
2216 * sec_helper.cc (get_sids_info): New function.
2217 * security.cc (extract_nt_dom_user): Simplify with strechr.
2218 (get_user_groups): Initialize glen to MAX_SID_LEN.
2219 (get_user_local_groups): Ditto.
2220 (get_attribute_from_acl): Define ace_sid as cygpsid.
2221 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
2222 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
2223 (get_nt_object_attribute): Ditto.
2224 (alloc_sd): Define ace_sid as cygpsid.
2225
2226 2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
2227
2228 * syscalls.cc (struct system_cleanup_args): New struct.
2229 (system_cleanup): New function.
2230 (system): Use pthread_cleanup_push and _pop to save and restore
2231 signal handlers and sigprocmask.
2232
2233 2003-02-04 Corinna Vinschen <corinna@vinschen.de>
2234
2235 * path.cc (symlink): Create security attributes so that only the
2236 user can modify the symlink.
2237 * security.cc (set_security_attribute): Remove symlink special
2238 handling.
2239
2240 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2241
2242 * grp.cc (internal_getgroups): Do not return without closing
2243 the process handle.
2244
2245 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2246
2247 * security.h (class cygpsid): New class.
2248 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
2249 get_uid, get_gid, string, debug_printf and the == and != operators.
2250 (cygsidlist::clear_supp): Only do work if setgroups has been called.
2251 * sec_helper.cc: Define sid_auth NO_COPY.
2252 (cygpsid::operator==): New operator.
2253 (cygpsid::get_id): New function.
2254 (cygpsid::string): New function.
2255 (cygsid::string): Delete.
2256 (cygsid::get_id): Delete.
2257 * pwdgrp.h: Change arguments of internal_getpwsid,
2258 internal_getgrsid and internal_getgroups to cygpsid.
2259 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
2260 * grp.cc (internal_getgrsid): Ditto.
2261 (internal_getgroups): Ditto.
2262
2263 2003-02-03 Christopher Faylor <cgf@redhat.com>
2264
2265 Eliminate most unneeded this-> pointers throughout.
2266
2267 2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
2268
2269 * security.h: Add third argument to set_process_privilege.
2270 * autoload.cc: Add OpenThreadToken.
2271 * sec_helper.cc (set_process_privilege): Add and use use_thread
2272 argument.
2273 * security.cc (alloc_sd): Modify call to set_process_privilege.
2274 Remember the result in each process. If failed and file owner is not
2275 the user, fail.
2276
2277 2003-02-03 Corinna Vinschen <corinna@vinschen.de>
2278
2279 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
2280 length and don't set errno in case of WSAEMSGSIZE error.
2281 (fhandler_socket::recvmsg): Ditto.
2282
2283 2003-02-01 Christopher Faylor <cgf@redhat.com>
2284
2285 * grp.cc (getgrent32): Only refresh group entries when at beginning.
2286 (internal_getgrsid): Only refresh if uninitialized.
2287 (internal_getgrent): Ditto.
2288 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
2289 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
2290 (internal_getpwsid): Only refresh if uninitialized.
2291 (getpass): No need to refresh passwd data here.
2292 * pwdgrp.h (refresh): Eliminate default.
2293
2294 2003-01-31 Christopher Faylor <cgf@redhat.com>
2295
2296 * dlfcn.cc (dlerror): Only report load errors once per error.
2297
2298 2003-01-31 Christopher Faylor <cgf@redhat.com>
2299
2300 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
2301 of res.
2302
2303 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
2304
2305 2003-01-31 Troy Curtiss <troyc@usa.net>
2306
2307 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
2308 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
2309 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
2310 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
2311 since 0 is not a valid Win32 setting.
2312 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
2313 B0, otherwise get it from the DCB.
2314
2315 2003-01-31 Christopher Faylor <cgf@redhat.com>
2316
2317 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
2318 Pierre Humblet).
2319 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
2320 have lock since that means we are in the process of reading the file.
2321
2322 2003-01-31 Jason Tishler <jason@tishler.net>
2323
2324 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
2325 reading HKLM.
2326
2327 2003-01-30 Christopher Faylor <cgf@redhat.com>
2328
2329 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
2330 error when inspecting path.
2331
2332 2003-01-29 Christopher Faylor <cgf@redhat.com>
2333
2334 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
2335 behavior.
2336
2337 2003-01-28 Corinna Vinschen <corinna@vinschen.de>
2338
2339 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
2340 set connection state of returned socket to CONNECTED.
2341
2342 2003-01-27 Christopher Faylor <cgf@redhat.com>
2343
2344 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
2345 non-numeric fields.
2346
2347 2003-01-26 Christopher Faylor <cgf@redhat.com>
2348
2349 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
2350 longer a valid return from next_str.
2351 (pwdgrp::add_line): Duh. Revert to use strchr.
2352
2353 2003-01-26 Christopher Faylor <cgf@redhat.com>
2354
2355 * string.h (strechr): New function.
2356 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
2357 Return EOS on failure. Don't check for NULL since it shouldn't be
2358 possible.
2359 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
2360 (pwdgrp::next_num): Pass explicit separator character to next_str.
2361 * grp.cc (pwdgrp::parse_group): Ditto.
2362 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
2363 input.
2364 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
2365
2366 2003-01-26 Christopher Faylor <cgf@redhat.com>
2367
2368 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
2369 CreateFile failure.
2370
2371 2003-01-26 Christopher Faylor <cgf@redhat.com>
2372
2373 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
2374 structure should always be completely filled out.
2375 * grp.cc (pwdgrp::parse_group): Ditto.
2376
2377 2003-01-26 Christopher Faylor <cgf@redhat.com>
2378
2379 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
2380 gr_mem.
2381
2382 2003-01-26 Christopher Faylor <cgf@redhat.com>
2383
2384 * include/sys/strace.h (paranoid_printf): Define as not being part of
2385 "all" output.
2386
2387 2003-01-25 Christopher Faylor <cgf@redhat.com>
2388
2389 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
2390 true/false if parse operation succeeded.
2391 (pwdgrp::reparse): Remove.
2392 (pwdgrp::raw_ptr): New function. Returns pointer in line.
2393 (pwdgrp::next_num): New functions for parsing other than unsigned long.
2394 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
2395 Don't fill in fields with NULL and assign empty gr_mem to known pointer
2396 rather than doing a pointless calloc. Streamline gr_mem parsing.
2397 Don't increment curr_lines here.
2398 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
2399 Don't increment curr_lines here.
2400 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
2401 (pwdgrp::reparse): Remove.
2402 (pwdgrp::next_num): Rename from next_int. Return bool indicating
2403 success of parse, argument returns value parsed.
2404 (pwdgrp::add_line): Increment curr_lines here on successful parse.
2405 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
2406 it here.
2407
2408 2003-01-25 Christopher Faylor <cgf@redhat.com>
2409
2410 * pwdgrp.cc (pwdgrp::reparse): Declare.
2411 * uinfo.cc (pwdgrp::reparse): Define.
2412 * grp.cc (pwdgrp::parse_group): Use reparse.
2413
2414 2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
2415
2416 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
2417 update the euid and call cygheap->user.set_name. Remove special
2418 handling of ILLEGAL_UID.
2419 (setgid32): Add a debug_printf. On Win95, always set the egid.
2420 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
2421 * child_info.h (class cygheap_exec_info): Remove uid.
2422 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
2423 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
2424 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
2425 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
2426
2427 2003-01-24 Christopher Faylor <cgf@redhat.com>
2428
2429 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
2430 scroll region if size changes.
2431
2432 2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
2433 Jason Tishler <jason@tishler.net>
2434
2435 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
2436 * syscalls.cc (setreuid32): New function.
2437 (setreuid): Ditto.
2438 (setregid32): Ditto.
2439 (setregid): Ditto.
2440 * include/cygwin/version.h: Bump API minor number.
2441
2442 2003-01-23 Christopher Faylor <cgf@redhat.com>
2443
2444 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2445
2446 2003-01-23 Christopher Faylor <cgf@redhat.com>
2447
2448 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
2449 instead. Use next_str and next_int to parse arguments.
2450 * passwd.cc (pwdgrp::parse_passwd): Ditto.
2451 (grab_string): Eliminate.
2452 (grab_int): Ditto.
2453 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
2454 (pwdgrp::parse_passwd): Reflect above change.
2455 (pwdgrp::parse_group): Reflect above change.
2456 (pwdgrp::next_str): New function.
2457 (pwdgrp::next_int): Ditto.
2458 (pwdgrp::gets): Eliminate.
2459 * uinfo.cc (pwdgrp::next_str): New function.
2460 (pwdgrp::next_int): Ditto.
2461 (pwdgrp::add_line): Subsume gets.
2462 (pwdgrp::gets): Eliminate.
2463 (pwdgrp::load): Just call add_line to parse input buffer.
2464
2465 2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
2466
2467 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
2468 2003-01-09 mutex patch.
2469 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
2470
2471 2003-01-22 Corinna Vinschen <corinna@vinschen.de>
2472
2473 * cygrun.c: Move from here to ../testsuite.
2474 * Makefile.in: Remove cygrun.exe dependencies.
2475
2476 2003-01-21 Jason Tishler <jason@tishler.net>
2477
2478 * cygwin.din: Export nanosleep().
2479 * signal.cc (nanosleep): New function.
2480 (sleep): Move old functionality to nanosleep(). Call nanosleep().
2481 (usleep): Remove old functionality. Call nanosleep().
2482 * include/cygwin/version.h: Bump API minor number.
2483
2484 2003-01-21 Christopher Faylor <cgf@redhat.com>
2485
2486 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
2487 throughout.
2488 (gr): Use constructor (sigh).
2489 (pwdgrp::parse_group): Rename from parse_grp.
2490 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
2491 with a single argument.
2492 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
2493 throughout.
2494 (pr): Use constructor (sigh).
2495 (pwdgrp::parse_passwd): Rename from "parse_pwd".
2496 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
2497 with a single argument.
2498 * pwdgrp.h (pwdgrp_state): Eliminate.
2499 (pwdgrp): Reflect above renamings.
2500 (pwdgrp::etc_ix): Rename from pwd_ix.
2501 (pwdgrp::read): New element.
2502 (pwdgrp::lock): New element.
2503 (pwdgrp::refresh): New function.
2504 (pwdgrp::load): Eliminate variations which take buffer arguments.
2505 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
2506 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
2507 (pwdgrp::load): Set initialized state to true rather than setting state
2508 to loaded.
2509
2510 2003-01-21 Christopher Faylor <cgf@redhat.com>
2511
2512 * include/cygwin/version.h: Bump DLL minor number.
2513
2514 2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
2515
2516 * path.h (etc::change_possible): Revert the type to bool.
2517 (etc::set_last_modified): Remove obsolete function.
2518 * path.cc (etc::change_possible): Revert type to bool.
2519 (etc::test_file_change): Do not test for negative values of
2520 change_possible and do not set it to -res.
2521 (etc::dir_changed): When the handle is NULL, call memset instead of
2522 test_file_changed. When the handle is invalid, return true. Detect
2523 filename change in /etc.
2524 (etc::file_changed): Remove unneeded check for !fn[n].
2525 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
2526 * pwdgrp.h (pwdgrp::operator =): Eliminate.
2527
2528 2003-01-19 Christopher Faylor <cgf@redhat.com>
2529
2530 * pwdgrp.h (etc): Move to path.h.
2531 (pwdgrp::max_lines): New field.
2532 (pwdgrp::curr_lines): New field.
2533 (pwdgrp::pwdgrp_buf): Ditto.
2534 (pwdgrp_buf_elem_size): Ditto.
2535 (pwdgrp_parse): Ditto.
2536 (pwdgrp::gets): Just declare here.
2537 (pwdgrp::load): Ditto. Just take one argument.
2538 (pwdgrp::load): Define overloaded function accepting passwd buf.
2539 (pwdgrp::load): Define overloaded function accepting group buf.
2540 * grp.cc: Use pwdgrp elements rather than standalone static variables
2541 throughout.
2542 (curr_lines): Eliminate.
2543 (max_lines): Ditto.
2544 (add_grp_line): Ditto.
2545 (parse_grp): Define as returning boolean. Accept void * arg and line
2546 count. Coerce first argument into __group32 buf reference. Increment
2547 curr_line as appropriate.
2548 (read_etc_group): Pass pwdgrp buffer to gr.load.
2549 * passwd.cc: Use pwdgrp elements rather than standalone static variables
2550 throughout.
2551 (curr_lines): Eliminate.
2552 (max_lines): Ditto.
2553 (add_grp_line): Ditto.
2554 (parse_passwd): Define as returning boolean. Accept void * arg and line
2555 count. Coerce first argument into passwd buf reference. Increment
2556 curr_line as appropriate.
2557 (read_etc_group): Pass pwdgrp buffer to pr.load.
2558 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
2559 zero.
2560 (etc::last_modified): Ditto.
2561 (etc::change_possible): Ditto. Renamed from sawchange. Change to
2562 signed char since elements are now tri-state.
2563 (etc::init): Assume "handle" is 1 based rather than 0.
2564 (etc::test_file_change): New function. Sets change_possible based on
2565 file date comparison.
2566 (etc::dir_changed): Check file states immediately after changed_h is
2567 initialized to avoid a race.
2568 (etc::file_changed): Use test_file_change to detect if file needs to be
2569 updated.
2570 * path.h (etc): Move class here from pwdgrp.h.
2571 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
2572 here.
2573 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
2574 (pwdgrp::add_line): New function.
2575 (pwdgrp::load): Call generic add_line function which will call correct
2576 parser.
2577
2578 2003-01-17 Christopher Faylor <cgf@redhat.com>
2579
2580 * cygheap.cc: Change most 'int's to 'unsigned's.
2581 (_cmalloc): Only check for size of malloced region when calculating
2582 bucket. Add overhead when performing the sbrk. Previous change broke
2583 _crealloc.
2584
2585 2003-01-17 Christopher Faylor <cgf@redhat.com>
2586
2587 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
2588 * grp.cc: Change most statics to NO_COPY throughout.
2589 * passwd.cc: Ditto.
2590
2591 2003-01-17 Christopher Faylor <cgf@redhat.com>
2592
2593 * pwdgrp.h: Change some BOOLs to bools.
2594 (pwdgrp::pwdgrp): Remove unneeded constructor.
2595 * passwd.cc: Change BOOL to bool throughout.
2596
2597 2003-01-17 Corinna Vinschen <corinna@vinschen.de>
2598
2599 * cygwin.din: Add strerror_r.
2600 * include/cygwin/version.h: Bump API minor number.
2601
2602 2003-01-17 Christopher Faylor <cgf@redhat.com>
2603
2604 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
2605 /etc, unless debugging.
2606
2607 2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
2608
2609 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
2610 "unknown" to "mkgroup".
2611 (internal_getgrgid): Do not return default in nontsec case.
2612 (internal_getgroups): Add argument srchsid and look for it in groups if
2613 not NULL.
2614 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
2615 same default uid for Win95 and NT. Call cygheap_user::ontherange to
2616 initialize HOME.
2617
2618 2003-01-16 Christopher Faylor <cgf@redhat.com>
2619
2620 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
2621 * cygheap.h (init_cygheap::etc_changed_h): Remove.
2622 (init_cygheap::etc_changed): Ditto.
2623 * grp.cc (group_state): Remove. Use gr instead throughout.
2624 (gr): Define as class pwdgrp.
2625 (read_etc_group): Remove gr definition. Remove calls to
2626 set_last_modified and close. Pass add_grp to gr.load to load file.
2627 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
2628 (pr): Define as class pwdgrp.
2629 (read_etc_passwd): Remove pr definition. Remove calls to
2630 set_last_modified and close. Pass add_pwd_line to pr.load to load
2631 file.
2632 * pwdgrp.h (etc): New helper class for pwdgrp.
2633 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
2634 file_w32 and last_modified fields.
2635 (pwdgrp::set_last_modified): Remove.
2636 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
2637 etc::file_changed.
2638 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
2639 scanning. Close file handle after reading buffer into memory. Parse
2640 buffer by calling second argument.
2641 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
2642 beginning of buffer.
2643 (pwdgrp::close): Remove.
2644 * uinfo.cc (etc::dir_changed): New function.
2645 (etc::init): Ditto.
2646 (etc::file_changed): Ditto.
2647 (etc::set_last_modified): Ditto.
2648
2649 2003-01-16 Jason Tishler <jason@tishler.net>
2650
2651 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
2652 ReadProcessMemory() error codes that trigger a retry with temporary
2653 PAGE_READONLY access. Note that this can occur on NT 4.0.
2654
2655 2003-01-15 Christopher Faylor <cgf@redhat.com>
2656
2657 * path.cc (normalize_posix_path): Convert win32 path separators to
2658 slashes when full path is specified.
2659
2660 2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
2661
2662 * cmalloc.cc (_cmalloc): Fix memory leak.
2663
2664 2003-01-15 Corinna Vinschen <corinna@vinschen.de>
2665
2666 * autoload.cc: Fix copyright date.
2667 * fhandler_dsp.cc: Ditto.
2668 * mmap.cc: Ditto.
2669 * net.cc: Ditto.
2670 * ntdll.h: Ditto.
2671 * signal.cc: Ditto.
2672 * syscalls.cc: Ditto.
2673 * uname.cc: Ditto.
2674 * wait.cc: Ditto.
2675
2676 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
2677
2678 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
2679 Change ambiguous debug output.
2680
2681 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
2682
2683 * mmap.cc (mmap_record::access): Change argument type to caddr_t
2684 for strictness.
2685 (mprotect): Protect against calling VirtualProtect() for shared
2686 pages on 9x/Me.
2687 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
2688 change protection of parent page to PAGE_READONLY, then try again.
2689 Revert protection afterwards.
2690
2691 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2692
2693 * syscalls.cc (system): Add pthread_testcancel call.
2694 * thread.cc: Update list of cancellation points.
2695
2696 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2697
2698 * wait.cc: Include thread.h
2699 (wait4): Add pthread_testcancel call.
2700 Wait for child process and cancellation event.
2701 * thread.cc: Update list of cancellation points.
2702
2703 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2704
2705 * signal.cc (sleep): Add pthread_testcancel call.
2706 Wait for signal and cancellation event.
2707 (usleep): Ditto.
2708
2709 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2710
2711 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
2712 Wait for signal and cancellation event.
2713 * thread.cc: Update list of cancellation points.
2714
2715 2003-01-14 David Huang <davehzhr@hotmail.com>
2716
2717 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
2718 SNDCTL_DSP_GETFMTS.
2719
2720 2003-01-12 Christopher Faylor <cgf@redhat.com>
2721
2722 * ntdll.h: Fix typo.
2723
2724 2003-01-12 Corinna Vinschen <corinna@vinschen.de>
2725
2726 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
2727
2728 2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
2729
2730 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
2731 (setacl): Start the search for a matching default at the next entry.
2732 Invalidate the type of merged entries instead of clearing it.
2733 Use well_known_creator for default owner and owning group and do
2734 not try to merge non-default and default entries in these cases.
2735 (getacl): Recognize well_known_creator for default owner and group.
2736 (acl_worker): Improve errno settings and streamline the nontsec case.
2737 * security.cc (write_sd): Remove the call to set_process_privilege.
2738 (alloc_sd): If the owner changes, call set_process_privilege and return
2739 immediately on failure. Change inheritance rules: on new directories add
2740 inherit only allow ACEs for creator_owner, creator_group and everyone.
2741 Preserve all inheritances through chmod and chown calls. Introduce
2742 isownergroup to implement the uid == gid case, to keep the inheritance
2743 code simple. Do not initialize owner_sid and group_sid and stop using
2744 the variable psd.
2745
2746 2003-01-10 Christopher Faylor <cgf@redhat.com>
2747
2748 * net.cc: Use gethostname define from winsock2.h.
2749
2750 2003-01-10 Christopher Faylor <cgf@redhat.com>
2751
2752 * path.cc: Unrevert below reversion except for
2753 mount_info::conv_to_posix_path part.
2754
2755 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
2756
2757 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
2758 rather than converting to posix.
2759
2760 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
2761
2762 * autoload.cc (gethostname): Make call optional, return 1 if function
2763 can't get loaded.
2764 * net.cc (cygwin_gethostname): Call GetComputerName if return value
2765 of gethostname is non-zero.
2766
2767 2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
2768
2769 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
2770 versions and underscore variants.
2771 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
2772
2773 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
2774
2775 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
2776
2777 2003-01-09 Christopher Faylor <cgf@redhat.com>
2778
2779 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
2780 condition.
2781 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
2782 that's what we're currently running at.
2783
2784 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2785
2786 * include/semaphore.h: Modify typedef for sem_t.
2787 * include/cygwin/types.h: Modify typedefs for pthread_t,
2788 pthread_mutex_t, pthread_key_t, pthread_attr_t,
2789 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
2790 pthread_rwlock_t and pthread_rwlockattr_t.
2791
2792 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2793
2794 * thread.h (WAIT_CANCELED): New define.
2795 (pthread::cancelable_wait): New static method.
2796 * thread.cc (pthread::cancelable_wait): Implement.
2797 (semaphore::Wait): Wait on semaphore and thread cancellation.
2798 (pthread::join): Wait on joined thread and thread cancellation.
2799 (semaphore::wait): Add testcancel to check for thread
2800 cancellation even if the semaphore is available.
2801
2802 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2803
2804 * include/pthread.h: Add define for errorchecking mutexes.
2805 Change default mutex type.
2806 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
2807 calls.
2808 (pthread_mutex::pthread_mutex): New implement.
2809 (pthread_mutex::~pthread_mutex): Ditto.
2810 (pthread_mutex::Lock): Ditto.
2811 (pthread_mutex::TryLock): Ditto.
2812 (pthread_mutex::UnLock): Ditto.
2813 (pthread_mutex::Destroy): Implement new method.
2814 (pthread_mutex::SetOwner): Ditto.
2815 (pthread_mutex::LockRecursive): Ditto.
2816 (pthread_mutex::fixup_after_fork): Restore locking state after
2817 fork.
2818 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
2819 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
2820 errorcode.
2821 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
2822 errorcode.
2823 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
2824 destroy mutex.
2825 (__pthread_mutexattr_settype): Allow errorchecking and recursive
2826 types.
2827 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
2828 (pthread_mutex::criticalsection): Remove.
2829 (pthread_mutex::lock_counter): New member.
2830 (pthread_mutex::recursion_counter): Ditto.
2831 (pthread_mutex::owner): Ditto.
2832 (pthread_mutex::type): Ditto.
2833 (pthread_mutex::Destroy): New method.
2834 (pthread_mutex::SetOwner): Ditto.
2835 (pthread_mutex::LockRecursive): Ditto.
2836
2837 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2838
2839 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
2840 * thread.cc: Some white spaces cleanups.
2841 Change __pthread_cond_init to pthread_cond::init throughout.
2842 (nativeMutex): Move class methods outside pthread_mutex.
2843 (MTinterface::Init): Initialize pthread_cond init lock.
2844 (pthread_cond::condInitializationLock): Instantiate.
2845 (pthread_cond::initMutex): New Method.
2846 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
2847 * thread.h: Some white spaces cleanups.
2848 (nativeMutex): Move class declaration outside pthread_mutex.
2849 (pthread_cond::condInitializationLock): New static member.
2850 (pthread_cond::initMutex): New Method.
2851 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
2852 (__pthread_cond_init): Remove prototype.
2853
2854 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
2855
2856 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
2857 directory unreadable.
2858
2859 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
2860
2861 * security.cc (get_nt_attribute): Always return -1 when read_sd()
2862 fails.
2863 (get_file_attribute): Set permissions to 0 and owner/group to -1
2864 if security descriptor is unreadable.
2865
2866 2003-01-09 Christopher Faylor <cgf@redhat.com>
2867
2868 Use isdirsep rather than SLASH_P throughout.
2869 * path.cc (iscygdrive): Disallow /cygdrive\x.
2870 (normalize_posix_path): "Normalize" a windows path, if detected, rather
2871 than converting to posix.
2872
2873 2003-01-06 Troy Curtiss <troyc@usa.net>
2874
2875 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
2876 capability checking for B230400 bitrate.
2877 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
2878 * include/sys/termios.h: Add B230400 definition for Posix support of
2879 230.4Kbps.
2880
2881 2003-01-05 Christopher Faylor <cgf@redhat.com>
2882
2883 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
2884 lock when leaving.
2885
2886 2003-01-03 Christopher Faylor <cgf@redhat.com>
2887
2888 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
2889 cleanup needed.
2890 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
2891 * pipe.cc (fhandler_pipe::close): Don't close read_state during
2892 fork_fixup since it wasn't inherited.
2893
2894 2003-01-01 Christopher Faylor <cgf@redhat.com>
2895
2896 * passwd.cc (getpwuid_r32): Revert previous change.
2897
2898 2003-01-01 Christopher Faylor <cgf@redhat.com>
2899
2900 * sysconf.cc (sysconf): Return arbitrary values for
2901 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
2902
2903 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
2904 calculation.
This page took 0.143854 seconds and 6 git commands to generate.