1 2003-07-25 Christopher Faylor <cgf@redhat.com>
3 * configure.in: Use 'install-sh -c'.
4 * configure: Regenerate.
6 2003-07-25 Christopher Faylor <cgf@redhat.com>
8 * configure.in: Always use install-sh.
9 * configure: Regenerate.
11 2003-07-25 Christopher Faylor <cgf@redhat.com>
13 * include/cygwin/socket.h: Conditionalize [AP]F_INET6 define.
15 2003-07-25 Christopher Faylor <cgf@redhat.com>
17 * Makefile.in (OBSOLETE_FUNCTION): Add fdopen.
19 2003-07-25 Christopher Faylor <cgf@redhat.com>
21 * cygwin.din: Export _fdopen64
22 * Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
23 * include/cygwin/version.h: Bump api minor number.
25 * ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT
28 2003-07-24 Christopher Faylor <cgf@redhat.com>
30 * environ.cc (check_case_init): Use strncasematch.
32 * cygwin.din: Export __mempcpy.
33 * cygwin/version.h: Bump api minor number.
35 2003-07-21 Pavel Tsekov <ptsekov@gmx.net>
37 * mmap.cc: Use proper format specifiers for _off64_t and size_t in
38 format strings passed to syscall_printf () and debug_printf ()
41 2003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
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.
47 2003-07-17 Corinna Vinschen <corinna@vinschen.de>
49 * sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
52 2003-07-14 Corinna Vinschen <corinna@vinschen.de>
54 * cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
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.
61 2003-07-14 Pierre Humblet <pierre.humblet@ieee.org>
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.
78 2003-07-12 Christopher Faylor <cgf@redhat.com>
80 * pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
81 communicating pid actually stops eventually.
83 2003-07-10 Christopher Faylor <cgf@redhat.com>
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
94 2003-07-09 Christopher Faylor <cgf@redhat.com>
96 * include/cygwin/version.h: Bump DLL minor number to 1.
98 2003-07-09 Christopher Faylor <cgf@redhat.com>
100 * fhandler_proc.cc (format_proc_stat): Use correctly sized constants
101 for filling in zeros on 98.
103 2003-07-09 Christopher Faylor <cgf@redhat.com>
105 * fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space
107 (format_proc_stat): Reorganize to accumulate and report on all cpus.
109 2003-07-09 Christopher Faylor <cgf@redhat.com>
111 * sysconf.cc (sysconf): Return processors online rather than bitmask
112 for _SC_NPROCESSORS_ONLN.
114 2003-07-08 Christopher Faylor <cgf@redhat.com>
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.
127 2003-07-07 Christopher Faylor <cgf@redhat.com>
129 * rmsym: Don't use ranlib.
131 2003-07-07 Christopher Faylor <cgf@redhat.com>
133 * newsym: Reenable removal of tmp directory. Just use ar to generate
135 * Makefile.in: Don't send ranlib to newsym or rmsym.
137 2003-07-07 Christopher Faylor <cgf@redhat.com>
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.
144 2003-07-06 Christopher Faylor <cgf@redhat.com>
146 * newsym: Oops. Revert below change.
148 2003-07-06 Christopher Faylor <cgf@redhat.com>
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.
154 2003-07-06 Christopher Faylor <cgf@redhat.com>
156 * syscalls.cc (gethostid): Set thread affinity so that results are
159 2003-07-05 Corinna Vinschen <corinna@vinschen.de>
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.
170 2003-07-05 N Stephens <nigel@mips.com>
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
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.
181 2003-07-04 Corinna Vinschen <corinna@vinschen.de>
183 * mmap.cc (fhandler_disk_file::mmap): Fix address test.
185 2003-07-03 Christopher Faylor <cgf@redhat.com>
187 * path.cc (fillout_mntent): Change "posix" to "managed".
189 2003-07-02 Christopher Faylor <cgf@redhat.com>
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
198 * path.cc (normalize_posix_path): Don't punt on files with colons.
199 (special_char): New function.
200 (mount_item::fnmunge): Ditto.
202 (special_name): Ditto.
203 (mount_item::build_win32): Avoid drive considerations when file is
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.
211 2003-07-03 Christopher Faylor <cgf@redhat.com>
213 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
214 more of the cygserver stuff so that ttys actually work.
216 2003-07-03 Corinna Vinschen <corinna@vinschen.de>
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.
224 2003-07-01 Christopher Faylor <cgf@redhat.com>
226 * thread.cc: Remove _MT_SAFE conditional.
228 2003-07-01 Christopher Faylor <cgf@redhat.com>
230 * configure.in: Fix --enable-server option.
231 * configure: Regenerate.
233 2003-07-01 Christopher Faylor <cgf@redhat.com>
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.
244 * tty.cc (tty::common_init): Ditto.
246 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
250 * security.cc: 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.
257 2003-07-01 Christopher Faylor <cgf@redhat.com>
259 * thread.cc: Remove _MT_SAFE conditional.
261 2003-07-01 Christopher Faylor <cgf@redhat.com>
263 * configure.in: Fix --enable-server option.
264 * configure: Regenerate.
266 2003-07-01 Christopher Faylor <cgf@redhat.com>
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.
277 * tty.cc (tty::common_init): Ditto.
279 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
283 * security.cc: 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.
290 2003-06-30 Pierre Humblet <pierre.humblet@ieee.org>
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
313 * spawn.cc (spawn_guts): Use new cygheap_user methods.
314 * syscalls.cc (seteuid32): Rearrange to use the two tokens
316 (setegid32): Use new cygheap_user methods.
317 * uinfo.cc: (internal_getlogin): Ditto.
319 2003-06-25 Doru Carastan <doru.carastan@mvista.com>
321 * Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL.
323 2003-06-24 Thomas Pfaff <tpfaff@gmx.net>
325 * thread.cc (MTinterface::fixup_after_fork): Fix thread list after
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.
344 2003-06-20 Christopher Faylor <cgf@redhat.com>
346 * pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a
347 pure windows process.
349 2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
351 * autoload.cc (GetNetworkParams): Add.
352 * net.cc (getdomainname): Call GetNetworkParams and read the
353 DhcpDomain registry value if warranted.
355 2003-06-17 Christopher Faylor <cgf@redhat.com>
357 * path.cc (mount): Do more strict checking on posix path arguments.
359 2003-06-15 Christopher Faylor <cgf@redhat.com>
361 Throughout, remove "include <errno.h>" from files which already include
364 2003-06-15 Thomas Pfaff <tpfaff@gmx.net>
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
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
383 2003-06-12 Thomas Pfaff <tpfaff@gmx.net>
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.
391 2003-06-12 Corinna Vinschen <corinna@vinschen.de>
393 * exceptions.cc (ctrl_c_handler): Don't send a signal on
394 CTRL_SHUTDOWN_EVENT. Add a comment to rationalize the patch.
396 2003-06-11 Thomas Pfaff <tpfaff@gmx.net>
398 * thread.cc (pthread_attr_init): Return 0 if attribute is already
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
406 2003-06-09 Pierre Humblet <pierre.humblet@ieee.org>
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.
415 * exceptions.cc (error_start_init): Quote the pgm in the command.
417 2003-06-07 Christopher Faylor <cgf@redhat.com>
419 * poll.cc: Define FD_SETSIZE to ridiculously large number so that there
420 will be no artificially small limits.
422 2003-06-07 Christopher Faylor <cgf@redhat.com>
424 * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when
427 2003-06-07 Thomas Pfaff <tpfaff@gmx.net>
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.
433 2003-06-06 Corinna Vinschen <corinna@vinschen.de>
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
440 (syslog): Just call vsyslog.
441 * include/cygwin/version.h: Bump API minor.
442 * include/sys/syslog.h: Add vsyslog declaration.
444 2003-06-05 Christopher Faylor <cgf@redhat.com>
446 * cygthread.cc (cygthread::terminate_thread): Change system_printf to
449 2003-06-04 Christopher Faylor <cgf@redhat.com>
451 * shared.cc (shared_info::heap_chunk_size): Be really defensive about
452 making sure that heap_chunk is set.
454 2003-06-04 Christopher Faylor <cgf@redhat.com>
456 * path.cc (conv_path_list): Use correct value when calculating length
457 to avoid a potential SEGV.
459 2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
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.
466 2003-06-03 Christopher Faylor <cgf@redhat.com>
468 * configure.in: Allow any i?86 variant.
469 * configure: Regenerate.
471 2003-06-03 Corinna Vinschen <corinna@vinschen.de>
472 Thomas Pfaff <tpfaff@gmx.net>
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.
482 2003-06-02 Christopher Faylor <cgf@redhat.com>
484 * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist.
486 2003-06-02 Christopher Faylor <cgf@redhat.com>
488 * cygthread.h (cygthread::terminate_thread): Mark private.
489 * cygthread.cc (cygthread::terminate_thread): Deallocate free_range
492 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
494 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
495 to `interrupted' as used in fhandler_socket::connect.
497 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
499 * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
501 (fhandler_socket::accept): Ditto.
503 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
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.
513 2003-06-02 Christopher Faylor <cgf@redhat.com>
515 * fhandler.cc (fhandler_base::write): Correct minor printf formatting
518 2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
520 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
521 an existing directory is a root if FindFirstFile fails.
523 2003-05-30 Christopher Faylor <cgf@redhat.com>
525 * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
526 was actually valid. Fix it.
528 2003-05-30 Christopher Faylor <cgf@redhat.com>
530 * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
533 * path.cc (path_conv::check): Rework has_acls logic slightly. Uncouple
534 exec tests away from filesystem tests.
536 2003-05-30 Corinna Vinschen <corinna@vinschen.de>
538 * include/sys/param.h: Add DEV_BSIZE.
540 2003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
541 Corinna Vinschen <corinna@vinschen.de>
543 * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
546 2003-05-28 Christopher Faylor <cgf@redhat.com>
548 * mkvers.sh: Avoid "-dontuse" tags.
550 * path.cc (path_conv::check): Set exec state based on known situations.
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
556 * path.h (mount_item::fnmunge): Declare new function.
557 (mount_item::build_win32): Ditto.
558 * sys/mount.h (MOUNT_ENC): Define.
560 2003-05-28 Corinna Vinschen <corinna@vinschen.de>
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.
567 2003-05-27 Thomas Pfaff <tpfaff@gmx.net>
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.
575 2003-05-27 Corinna Vinschen <corinna@vinschen.de>
577 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
578 using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
580 2003-05-27 Bill C. Riemers <cygwin@docbill.net>
582 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
583 permissions through umask on FAT or if ntsec is off.
585 2003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
587 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
589 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
591 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
592 instead of numeric constant.
594 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
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.
600 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
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.
615 2003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
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.
624 2003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
626 * fhandler_process.cc (format_process_stat): Use PagefileUsage
627 instead of VirtualSize.
628 (get_mem_values): Ditto.
630 2003-05-21 Corinna Vinschen <corinna@vinschen.de>
632 * shared_info.h: Match shared_name declaration with below change.
633 * shared.cc (shared_name): Use incoming char * parameter instead of
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.
642 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
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.
650 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
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
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
665 (wincapc::init): Accomodate Windows 2003 Server.
666 * wincap.h (struct wincaps): Add has_terminal_services capability.
668 2003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
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.
675 2003-05-18 Joe Buehler <jhpb@hekimian.com>
677 * spawn.cc (spawn_guts): Show more of command line in strace output.
679 2003-05-15 Thomas Pfaff <tpfaff@gmx.net>
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.
691 2003-05-15 Corinna Vinschen <corinna@vinschen.de>
693 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
696 2003-05-13 Corinna Vinschen <corinna@vinschen.de>
698 * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
700 2003-05-12 Corinna Vinschen <corinna@vinschen.de>
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.
709 (_fstat64_r): New function.
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.
720 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
722 Replace ino_t by __ino64_t throughout.
724 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
726 * include/cygwin/types.h: Add key_t typedef.
728 2003-05-10 Christopher Faylor <cgf@redhat.com>
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
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.
743 (ino_t): Define appropriately.
745 2003-05-10 Corinna Vinschen <corinna@vinschen.de>
747 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
750 * include/cygwin/version.h: Bump API minor number.
752 2003-05-09 Corinna Vinschen <corinna@vinschen.de>
754 * include/cygwin/config.h: New file.
756 2003-05-09 Christopher Faylor <cgf@redhat.com>
758 * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
759 completion over waiting for signal delivery.
761 2003-05-06 Thomas Pfaff <tpfaff@gmx.net>
763 * signal.cc (nanosleep): Do not wait twice for signal arrival.
765 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
767 * include/cygwin/types.h: Fix erroneous definition of ino_t from
770 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
772 * syscalls.cc (chown_worker): Allow chown'ing of socket files.
774 2003-04-30 Thomas Pfaff <tpfaff@gmx.net>
776 * Makefile.in: Revert patch from 2003-04-17.
778 2003-04-28 Brian Ford <ford@vss.fsi.com>
780 * profil.h (PROFADDR): Prevent overflow when text segments are larger
782 * profil.c (profthr_func): Raise thread priority for more accurate
785 2003-04-26 Christopher Faylor <cgf@redhat.com>
787 * path.cc (hash_path_name): Use ino_t as type.
789 2003-04-26 Christopher Faylor <cgf@redhat.com>
791 * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
794 2003-04-25 Corinna Vinschen <corinna@vinschen.de>
796 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
797 to allow standalone usage (autoconf).
799 2003-04-23 Christopher Faylor <cgf@redhat.com>
801 * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
804 2003-04-22 Christopher Faylor <cgf@redhat.com>
806 * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
807 called for successful non-blocking pipe reads.
809 2003-04-22 Corinna Vinschen <corinna@vinschen.de>
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.
817 2003-04-21 Christopher Faylor <cgf@redhat.com>
819 * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
820 minor number to 0. Bump API minor number.
822 2003-04-20 Corinna Vinschen <corinna@vinschen.de>
824 * autoload.cc (CreateWindowStationA): Add.
825 (SetProcessWindowStation): Add.
827 2003-04-19 Christopher Faylor <cgf@redhat.com>
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.
835 2003-04-18 Christopher Faylor <cgf@redhat.com>
837 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
838 whenever a pty is allocated.
840 2003-04-18 Christopher Faylor <cgf@redhat.com>
842 * Makefile.in: Use ${nostdlib} variable.
844 2003-04-18 Diego Biurrun <diego@biurrun.de>
846 * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
847 id" string to "vendor_id" to conform with Linux systems.
849 2003-04-17 Christopher Faylor <cgf@redhat.com>
851 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
853 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
855 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
856 * autoload.cc (LoadDLLprime): Rename std_dll_init to
858 (std_dll_init): Remove name mangling prototype. Add attributes
861 Change wsock_init to _wsock_init in wsock32 and ws2_32
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.
870 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
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.
876 2003-04-15 Christopher Faylor <cgf@redhat.com>
878 * termios.cc (setspeed): New function.
879 (cfsetospeed): Use setspeed to set speed.
880 (cfsetispeed): Use setspeed to set speed.
882 2003-04-15 Chris January <chris@atomice.net>
884 * autoload.cc: Add load statement for UuidCreate, and
885 UuidCreateSequential.
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.
893 2003-04-15 Thomas Pfaff <tpfaff@gmx.net>
895 * thread.h (pthread_rwlock::release): New method.
896 * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
898 (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
900 (pthread_rwlock::wrlock_cleanup): Ditto.
902 2003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
904 * mkvers.sh: Prefix day with 0 in date only when day < 10.
906 2003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
908 * security.cc (get_info_from_sd): New function.
909 (get_nt_attribute): Only call read_sd and get_info_from_sd.
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.
915 (get_object_attribute): Remove symlink handling and simply return -1
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.
922 2003-04-10 Christopher Faylor <cgf@redhat.com>
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.
929 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
931 * regex/regex.h: Define regoff_t as _off_t.
932 * regex/regex2.h: Ditto.
934 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
936 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
937 * include/cygwin/version.h: Bump API minor number.
939 2003-04-10 Christopher Faylor <cgf@redhat.com>
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).
951 2003-04-08 Bob Cassels <bcassels@abinitio.com>
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.
957 2003-04-07 Christopher Faylor <cgf@redhat.com>
959 * include/limits.h (IOV_MAX): Set to a number which is small enough to
962 2003-04-04 Christopher Faylor <cgf@redhat.com>
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),
970 (cygthread::terminate_thread): Set avail to uninitialized.
971 (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
974 2003-04-04 Christopher Faylor <cgf@redhat.com>
976 * cygthread.cc (cygthread::operator new): Be more defensive when messing with
977 threads that are marked "unavailable".
979 2003-04-03 Christopher Faylor <cgf@redhat.com>
981 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
983 2003-04-03 Corinna Vinschen <corinna@vinschen.de>
985 * external.cc (check_ntsec): Return general ntsec state on NULL
986 filename. Check wincap.is_security() additionally.
988 2003-04-02 Christopher Faylor <cgf@redhat.com>
990 * Makefile.in (EXTRA_OFILES): Remove debugging object.
992 2003-04-02 Jason Tishler <jason@tishler.net>
993 Christopher Faylor <cgf@redhat.com>
995 * external.cc (check_ntsec): New function.
996 (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
998 * include/cygwin/version.h: Bump API minor number.
999 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
1001 2003-04-02 Christopher Faylor <cgf@redhat.com>
1003 * cygthread.cc (cygthread::new): Add more defensive debugging.
1005 2003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
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.
1016 2003-04-01 Corinna Vinschen <corinna@vinschen.de>
1018 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
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.
1037 * syscalls.cc: Ditto.
1039 * include/cygwin/stat.h: Ditto.
1040 * include/cygwin/types.h: Ditto. Remove definition of __off32_t
1043 2003-03-31 Christopher Faylor <cgf@redhat.com>
1045 * exceptions.cc (setup_handler): Make sure winapi lock is released when
1048 2003-03-30 Christopher Faylor <cgf@redhat.com>
1050 * include/cygwin/fs.h: Remove unneeded include.
1051 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
1053 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
1055 * syscalls.cc (login): Fix comment.
1058 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
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
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.
1073 (pututline): Ditto. Use mutex to secure against concurrent access to
1076 2003-03-28 Christopher Faylor <cgf@redhat.com>
1078 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
1079 * configure.in: Remove EXE_LDFLAGS.
1080 * configure: Regenerate.
1082 2003-03-28 Christopher Faylor <cgf@redhat.com>
1084 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
1085 * external.cc (cygwin_internal): Define as unsigned long.
1087 2003-03-27 Christopher Faylor <cgf@redhat.com>
1089 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
1092 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1094 * thread.cc: Change 1==foo equations to foo==1 throughout.
1096 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1098 * thread.h: Change class names, methods, members and local vars
1099 according to the GNU coding style.
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.
1106 2003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
1108 * autoload.cc: Add RegGetKeySecurity().
1109 * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
1112 2003-03-25 Christopher Faylor <cgf@redhat.com>
1113 Joe Buehler <jhpb@draco.hekimian.com>
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
1119 2003-03-23 Thomas Pfaff <tpfaff@gmx.net>
1121 * thread.h (class List): Move inline code inside class declaration.
1122 (List::forEach): Change callback parameter to template class member
1124 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
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.
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
1160 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
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
1166 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
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
1179 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
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
1186 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
1188 2003-03-22 Christopher Faylor <cgf@redhat.com>
1190 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
1193 2003-03-22 Christopher Faylor <cgf@redhat.com>
1195 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
1196 called. Fix typo in debugging output.
1198 2003-03-21 Christopher Faylor <cgf@redhat.com>
1200 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
1201 necessary for newer versions of bash.
1203 2003-03-20 Corinna Vinschen <corinna@vinschen.de>
1205 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
1206 SIGPIPE handling to connection oriented sockets. Add comment.
1208 2003-03-19 Christopher Faylor <cgf@redhat.com>
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
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.
1219 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1221 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
1224 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
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.
1234 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1236 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
1238 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
1239 instead of numerical constants.
1242 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
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.
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.
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.
1429 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
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
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.
1488 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
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
1516 (__pthread_cond_broadcast): Just return 0 if the condition is
1517 not initialized. Call pthread_cond::UnBlock to release blocked
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.
1525 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
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
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.
1561 2003-03-18 Christopher January <chris@atomice.net>
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.
1567 2003-03-17 Corinna Vinschen <corinna@vinschen.de>
1569 * glob.c (g_lstat): Change API minor test to match API minor number
1570 change in previous patch.
1573 2003-03-17 Christopher Faylor <cgf@redhat.com>
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.
1580 2003-03-17 Christopher Faylor <cgf@redhat.com>
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.
1587 2003-03-16 Christopher Faylor <cgf@redhat.com>
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.
1599 2003-03-14 Christopher Faylor <cgf@redhat.com>
1601 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
1604 2003-03-13 Christopher Faylor <cgf@redhat.com>
1606 * include/cygwin/version.h: Bump DLL minor number to 23.
1608 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
1610 * autoload.cc (IsProcessorFeaturePresent): Add.
1611 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
1613 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
1615 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
1617 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
1619 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
1620 (cygwin_rexec): Ditto.
1622 2003-03-13 Christopher Faylor <cgf@redhat.com>
1624 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
1627 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
1629 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
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.
1635 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
1637 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
1638 using WinSock2 socket duplication methods. Add comment.
1640 2003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
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.
1646 2003-03-10 Corinna Vinschen <corinna@vinschen.de>
1648 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
1649 * security.cc (alloc_sd): Ditto.
1651 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
1653 * winver.rc: Change Copyright hint to include 2003.
1655 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
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
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
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
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
1702 2003-03-09 Christopher Faylor <cgf@redhat.com>
1704 * include/cygwin/version.h: Bump DLL minor number to 22.
1706 2003-03-09 Christopher Faylor <cgf@redhat.com>
1708 Do some minor reformatting of 'extern "C"' use throughout.
1710 2003-03-06 Christopher January <chris@atomice.net>
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
1716 (format_proc_uptime): Use GetSystemTimes if available.
1717 (read_value): New macro.
1719 (cpuid): New function.
1720 (can_set_flag): New function.
1721 (format_proc_cpuinfo): New function.
1722 (format_proc_partitions): New function.
1724 2003-03-09 Christopher Faylor <cgf@redhat.com>
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.
1730 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
1732 * rmsym: Fix regular expression.
1734 2003-03-09 Christopher Faylor <cgf@redhat.com>
1736 * Makefile.in: Change from using new-* to cygwin0 for temporary
1739 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
1741 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
1743 2003-03-08 Christopher Faylor <cgf@redhat.com>
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
1748 (link): Generate full path for potentially recalculated .lnk target.
1750 2003-03-08 Christopher Faylor <cgf@redhat.com>
1752 Revert below changes regarding _pinfo::cmdline.
1754 2003-03-08 Corinna Vinschen <corinna@vinschen.de>
1756 * external.cc (cygwin_internal): Change n to __off64_t to match change
1758 * fhandler.h (class fhandler_virtual): Change filesize member to
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.
1769 2003-03-07 Christopher Faylor <cgf@redhat.com>
1771 * path.h (PATH_LNK): New enum val.
1772 (path_conv::is_lnk_symlink): New function. True if path represents
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
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.
1783 2003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
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.
1790 2003-03-07 Corinna Vinschen <corinna@vinschen.de>
1792 * syscalls.cc (seteuid32): Fix formatting.
1794 2003-03-04 Thomas Pfaff <tpfaff@gmx.net>
1796 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
1797 prior to pthread objects.
1799 2003-03-04 Jason Tishler <jason@tishler.net>
1801 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
1803 2003-03-03 Christopher Faylor <cgf@redhat.com>
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.
1817 2003-03-03 Christopher Faylor <cgf@redhat.com>
1819 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
1820 fhandler_console::open_fhs here.
1821 (fhandler_pty_slave::close): Ditto for close.
1823 2003-03-02 Christopher Faylor <cgf@redhat.com>
1825 * lib/getopt.c: Refresh from NetBSD sources.
1827 2003-03-02 Christopher Faylor <cgf@redhat.com>
1829 * fhandler_console.cc (fhandler_console::close): Don't decrement
1830 in use counter if in vfork fixup stage.
1832 2003-03-02 Christopher Faylor <cgf@redhat.com>
1834 * lib/getopt.c: Nuke use of unneeded BSDisms.
1836 2003-03-02 Christopher Faylor <cgf@redhat.com>
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.
1854 2003-03-02 Christopher Faylor <cgf@redhat.com>
1856 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
1857 LoadLibrary was ignored.
1859 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
1861 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
1862 file using Win32 calls.
1864 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
1866 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
1869 2003-02-28 Christopher Faylor <cgf@redhat.com>
1871 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
1872 * dcrt0.cc (cygwin_atexit): New function.
1873 (cygwin_exit): Ditto.
1875 2003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
1877 * syscalls.cc (fstat64): Pass get_name () to pc.
1878 (access): Pass fn to stat_worker.
1880 2003-03-27 Corinna Vinschen <corinna@vinschen.de>
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.
1888 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1890 * fhandler_socket.cc (fhandler_socket::connect): Add support for
1891 an interruptable connect.
1893 2003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
1895 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
1896 if the call to set the primary group succeeds.
1898 2003-02-27 Christopher Faylor <cgf@redhat.com>
1900 * cygthread::detach: Improve error message.
1902 2003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
1904 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
1906 2003-02-25 Corinna Vinschen <corinna@vinschen.de>
1908 * mmap.cc (mmap64): Fix returned address by taking the granularity
1911 2003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
1913 * syslog.cc (syslog): Do not unlock the file before closing it
1914 and remove debug_printf about stream errors.
1916 2003-02-22 Christopher Faylor <cgf@redhat.com>
1918 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
1919 # cygwin.din: Export mallinfo.
1920 # malloc_wrapper.cc (mallinfo): New function.
1922 2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
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.
1928 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
1930 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
1932 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
1933 uid/gid of current process in case of open sockets.
1935 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
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
1944 (fhandler_socket::fstat): Reorganize to return more Linux-like
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
1955 (stat_worker): Ditto.
1957 2003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
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.
1967 2003-02-19 Christopher Faylor <cgf@redhat.com>
1969 * fhandler.cc (fhandler_base::open): Move some filesystem specific
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.
1975 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
1977 * wincap.h (wincap): Remove unnecessary definition of
1978 supports_sparse_files.
1981 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
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.
1994 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
1996 * autoload.cc (GetCompressedFileSize): Add.
1997 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
1998 st_blocks value from GetCompressedFileSize() if available.
2000 2003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
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.
2006 (wincap_95osr2): Ditto.
2008 (wincap_98se): Ditto.
2010 (wincap_nt3): Ditto.
2011 (wincap_nt4): Ditto.
2012 (wincap_nt4sp4): Ditto.
2013 (wincap_2000): 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.
2020 2003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
2022 * grp.cc (internal_getgroups): Handle properly tokens with
2023 no groups. Fix bug introduced on 2003-02-04.
2025 2003-02-16 Christopher Faylor <cgf@redhat.com>
2027 * cygwin.din: Export all appropriate newlib libm functions. Sort.
2028 * include/cygwin/version.h: Bump API minor number.
2030 2003-02-15 Christopher Faylor <cgf@redhat.com>
2032 * cygwin.din: Export all appropriate newlib libc functions.
2033 * include/cygwin/version.h: Bump API minor number.
2035 2003-02-14 Jason Tishler <jason@tishler.net>
2037 * mmap.cc (mprotect): Add missing break.
2039 2003-02-13 Christopher Faylor <cgf@redhat.com>
2041 * exceptions.cc (try_to_debug): Don't reset priority when returning
2042 from non-waitloop call.
2044 2003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2045 Christopher Faylor <cgf@redhat.com>
2047 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
2049 * autoload.cc (MessageBeep): Add.
2051 2003-02-13 Christopher Faylor <cgf@redhat.com>
2053 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
2055 2003-02-13 Christopher Faylor <cgf@redhat.com>
2057 * environ.cc (environ_init): Use strechr.
2059 2003-02-13 Christopher Faylor <cgf@redhat.com>
2061 * include/cygwin/in.h (sockaddr_in): Fix typo.
2063 2003-02-12 Christopher Faylor <cgf@redhat.com>
2065 * path.h (path_conv): Reorganize slightly.
2067 2003-02-12 Christopher Faylor <cgf@redhat.com>
2069 * fhandler_tty.cc (process_input): Add sanity check to ensure that
2070 console typeahead is cleared on signal.
2072 2003-02-12 Christopher Faylor <cgf@redhat.com>
2074 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
2077 2003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
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.
2085 2003-02-10 Christopher Faylor <cgf@redhat.com>
2087 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
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.
2098 2003-02-08 Christopher Faylor <cgf@redhat.com>
2100 * include/cygwin/version.h: Bump DLL minor number to 21.
2102 2003-02-07 Christopher Faylor <cgf@redhat.com>
2104 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
2107 2003-02-07 Corinna Vinschen <corinna@vinschen.de>
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'.
2120 (fhandler_disk_file::mmap): Streamline code.
2122 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
2124 2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2125 Christopher Faylor <cgf@redhat.com>
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.
2131 2003-02-07 Christopher Faylor <cgf@redhat.com>
2133 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
2135 2003-02-07 Christopher Faylor <cgf@redhat.com>
2137 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
2139 2003-02-06 Christopher Faylor <cgf@redhat.com>
2141 * heap.cc (heap_init): Remove debugging code.
2143 2003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
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
2151 (getgrgid): Use gid16togid32.
2152 * sec_helper.cc (is_grp_member): Delete.
2154 2003-02-05 Christopher Faylor <cgf@redhat.com>
2156 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
2157 (conv_path_list_buf_size): Accommodate relative paths.
2159 2003-02-05 Christopher Faylor <cgf@redhat.com>
2161 * path.cc (etc::dir_changed): Fix debug printf.
2163 2003-02-05 Corinna Vinschen <corinna@vinschen.de>
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.
2169 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2171 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
2172 wrapper function definitions. Replace call to the aclXYZ functions by
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.
2186 (aclcheck32): 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.
2201 (aclfrommode): Ditto.
2202 (acltopbits): Ditto.
2203 (aclfrompbits): Ditto.
2205 (aclfromtext): Ditto.
2206 * security.cc (write_sd): Call set_process_privilege and check
2208 (alloc_sd): Remove call to set_process_privilege and the owner check.
2210 2003-02-05 Christopher Faylor <cgf@redhat.com>
2212 * include/sys/cygwin.h: Use C-style comments.
2214 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
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.
2226 2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
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.
2233 2003-02-04 Corinna Vinschen <corinna@vinschen.de>
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
2240 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2242 * grp.cc (internal_getgroups): Do not return without closing
2245 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
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.
2263 2003-02-03 Christopher Faylor <cgf@redhat.com>
2265 Eliminate most unneeded this-> pointers throughout.
2267 2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
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
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
2277 2003-02-03 Corinna Vinschen <corinna@vinschen.de>
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.
2283 2003-02-01 Christopher Faylor <cgf@redhat.com>
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.
2294 2003-01-31 Christopher Faylor <cgf@redhat.com>
2296 * dlfcn.cc (dlerror): Only report load errors once per error.
2298 2003-01-31 Christopher Faylor <cgf@redhat.com>
2300 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
2303 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
2305 2003-01-31 Troy Curtiss <troyc@usa.net>
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.
2315 2003-01-31 Christopher Faylor <cgf@redhat.com>
2317 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
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.
2322 2003-01-31 Jason Tishler <jason@tishler.net>
2324 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
2327 2003-01-30 Christopher Faylor <cgf@redhat.com>
2329 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
2330 error when inspecting path.
2332 2003-01-29 Christopher Faylor <cgf@redhat.com>
2334 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
2337 2003-01-28 Corinna Vinschen <corinna@vinschen.de>
2339 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
2340 set connection state of returned socket to CONNECTED.
2342 2003-01-27 Christopher Faylor <cgf@redhat.com>
2344 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
2347 2003-01-26 Christopher Faylor <cgf@redhat.com>
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.
2353 2003-01-26 Christopher Faylor <cgf@redhat.com>
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
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
2364 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
2366 2003-01-26 Christopher Faylor <cgf@redhat.com>
2368 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
2371 2003-01-26 Christopher Faylor <cgf@redhat.com>
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.
2377 2003-01-26 Christopher Faylor <cgf@redhat.com>
2379 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
2382 2003-01-26 Christopher Faylor <cgf@redhat.com>
2384 * include/sys/strace.h (paranoid_printf): Define as not being part of
2387 2003-01-25 Christopher Faylor <cgf@redhat.com>
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
2408 2003-01-25 Christopher Faylor <cgf@redhat.com>
2410 * pwdgrp.cc (pwdgrp::reparse): Declare.
2411 * uinfo.cc (pwdgrp::reparse): Define.
2412 * grp.cc (pwdgrp::parse_group): Use reparse.
2414 2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
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.
2427 2003-01-24 Christopher Faylor <cgf@redhat.com>
2429 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
2430 scroll region if size changes.
2432 2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
2433 Jason Tishler <jason@tishler.net>
2435 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
2436 * syscalls.cc (setreuid32): New function.
2438 (setregid32): Ditto.
2440 * include/cygwin/version.h: Bump API minor number.
2442 2003-01-23 Christopher Faylor <cgf@redhat.com>
2444 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2446 2003-01-23 Christopher Faylor <cgf@redhat.com>
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.
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.
2465 2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
2467 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
2468 2003-01-09 mutex patch.
2469 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
2471 2003-01-22 Corinna Vinschen <corinna@vinschen.de>
2473 * cygrun.c: Move from here to ../testsuite.
2474 * Makefile.in: Remove cygrun.exe dependencies.
2476 2003-01-21 Jason Tishler <jason@tishler.net>
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.
2484 2003-01-21 Christopher Faylor <cgf@redhat.com>
2486 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
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
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
2510 2003-01-21 Christopher Faylor <cgf@redhat.com>
2512 * include/cygwin/version.h: Bump DLL minor number.
2514 2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
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.
2528 2003-01-19 Christopher Faylor <cgf@redhat.com>
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
2542 (curr_lines): Eliminate.
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
2551 (curr_lines): Eliminate.
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
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
2570 * path.h (etc): Move class here from pwdgrp.h.
2571 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
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
2578 2003-01-17 Christopher Faylor <cgf@redhat.com>
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
2585 2003-01-17 Christopher Faylor <cgf@redhat.com>
2587 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
2588 * grp.cc: Change most statics to NO_COPY throughout.
2591 2003-01-17 Christopher Faylor <cgf@redhat.com>
2593 * pwdgrp.h: Change some BOOLs to bools.
2594 (pwdgrp::pwdgrp): Remove unneeded constructor.
2595 * passwd.cc: Change BOOL to bool throughout.
2597 2003-01-17 Corinna Vinschen <corinna@vinschen.de>
2599 * cygwin.din: Add strerror_r.
2600 * include/cygwin/version.h: Bump API minor number.
2602 2003-01-17 Christopher Faylor <cgf@redhat.com>
2604 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
2605 /etc, unless debugging.
2607 2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
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
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
2618 2003-01-16 Christopher Faylor <cgf@redhat.com>
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
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
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.
2646 (etc::file_changed): Ditto.
2647 (etc::set_last_modified): Ditto.
2649 2003-01-16 Jason Tishler <jason@tishler.net>
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.
2655 2003-01-15 Christopher Faylor <cgf@redhat.com>
2657 * path.cc (normalize_posix_path): Convert win32 path separators to
2658 slashes when full path is specified.
2660 2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
2662 * cmalloc.cc (_cmalloc): Fix memory leak.
2664 2003-01-15 Corinna Vinschen <corinna@vinschen.de>
2666 * autoload.cc: Fix copyright date.
2667 * fhandler_dsp.cc: Ditto.
2672 * syscalls.cc: Ditto.
2676 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
2678 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
2679 Change ambiguous debug output.
2681 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
2683 * mmap.cc (mmap_record::access): Change argument type to caddr_t
2685 (mprotect): Protect against calling VirtualProtect() for shared
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.
2691 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2693 * syscalls.cc (system): Add pthread_testcancel call.
2694 * thread.cc: Update list of cancellation points.
2696 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
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.
2703 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2705 * signal.cc (sleep): Add pthread_testcancel call.
2706 Wait for signal and cancellation event.
2709 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2711 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
2712 Wait for signal and cancellation event.
2713 * thread.cc: Update list of cancellation points.
2715 2003-01-14 David Huang <davehzhr@hotmail.com>
2717 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
2720 2003-01-12 Christopher Faylor <cgf@redhat.com>
2722 * ntdll.h: Fix typo.
2724 2003-01-12 Corinna Vinschen <corinna@vinschen.de>
2726 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
2728 2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
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
2746 2003-01-10 Christopher Faylor <cgf@redhat.com>
2748 * net.cc: Use gethostname define from winsock2.h.
2750 2003-01-10 Christopher Faylor <cgf@redhat.com>
2752 * path.cc: Unrevert below reversion except for
2753 mount_info::conv_to_posix_path part.
2755 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
2757 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
2758 rather than converting to posix.
2760 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
2762 * autoload.cc (gethostname): Make call optional, return 1 if function
2764 * net.cc (cygwin_gethostname): Call GetComputerName if return value
2765 of gethostname is non-zero.
2767 2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
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.
2773 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
2775 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
2777 2003-01-09 Christopher Faylor <cgf@redhat.com>
2779 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
2781 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
2782 that's what we're currently running at.
2784 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
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.
2792 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
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.
2802 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2804 * include/pthread.h: Add define for errorchecking mutexes.
2805 Change default mutex type.
2806 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
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
2818 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
2819 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
2821 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
2823 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
2825 (__pthread_mutexattr_settype): Allow errorchecking and recursive
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.
2837 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
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.
2854 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
2856 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
2857 directory unreadable.
2859 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
2861 * security.cc (get_nt_attribute): Always return -1 when read_sd()
2863 (get_file_attribute): Set permissions to 0 and owner/group to -1
2864 if security descriptor is unreadable.
2866 2003-01-09 Christopher Faylor <cgf@redhat.com>
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.
2873 2003-01-06 Troy Curtiss <troyc@usa.net>
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
2881 2003-01-05 Christopher Faylor <cgf@redhat.com>
2883 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
2886 2003-01-03 Christopher Faylor <cgf@redhat.com>
2888 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
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.
2894 2003-01-01 Christopher Faylor <cgf@redhat.com>
2896 * passwd.cc (getpwuid_r32): Revert previous change.
2898 2003-01-01 Christopher Faylor <cgf@redhat.com>
2900 * sysconf.cc (sysconf): Return arbitrary values for
2901 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
2903 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check