1 2003-09-04 Christopher Faylor <cgf@redhat.com>
3 * dcrt0.cc (__argc_safe): New variable.
4 (dll_crt0_1): Store argc in __argc_safe, which will theoretically
5 remain untouched by the user.
6 * fhandler_console.cc (fhandler_console::read): Silence some compiler
8 * fhandler_raw.cc (fhandler_dev_raw::raw_read): Ditto.
9 * pinfo.cc (_pinfo::commune_recv): Carefully bound argv scan and check
10 for potentially bad pointers since user could have set argv cell to
12 * cygheap.h (CYGHEAPSIZE): Bump up size.
14 2003-09-04 Corinna Vinschen <corinna@vinschen.de>
16 * sysconf.cc (sysconf): Return more accurate value for _SC_AVPHYS_PAGES.
18 2003-09-04 Corinna Vinschen <corinna@vinschen.de>
20 * mmap.cc: Restructure. Add, remove and rewrite comments throughout
21 for better readability. Change function names for better
23 (MAP_SET): Accomodate name change from map_map_ to page_map_.
26 (mmap_record::page_map_): Rename from page_map_.
27 (mmap_record::get_map): Remove.
28 (mmap_record::alloc_page_map): Rename from alloc_map. Return bool
29 indicating success of cygheap memory allocation.
30 (mmap_record::free_page_map): Rename from free_map.
31 (mmap_record::fixup_page_map): Rename from fixup_map.
32 (mmap_record::find_unused_pages): Rename from find_empty.
33 (mmap_record::map_pages): Rename from map_map.
34 (mmap_record::unmap_pages): Rename from unmap_map.
35 (class list): Make all class members private.
37 (list::~list): Remove.
38 (list::get_fd): New attribute reader.
39 (list::get_hash): Ditto.
40 (list::get_record): Ditto.
41 (list::add_record): Manage all allocation for mmap_records. Check
42 for failed memory allocation and return NULL if so.
43 (list::set): New function.
44 (list::del_record): Rename from erase. Return true if last mmap_record
45 has been deleted, false otherwise. Check for legal incoming index
47 (list::erase): Remove erase/0.
48 (list::search_record): Rename from match.
51 (map::add_list): Manage all allocation for lists. Check for failed
52 memory allocation and return NULL if so.
53 (map::get_list): New method.
54 (map::del_list): Rename from erase. Check for legal incoming index
56 (mmap64): Check for failed mmap_record memory allocation. Return
57 with MAP_FAILED and errno set to ENOMEM if so.
58 (munmap): Rearrange loop using new list and mmap_record accessor
59 functions. Rename loop index variables for better understanding.
60 Check if list can be deleted after last mmap_record in it has been
62 (msync): Rearrange loop using new list and mmap_record accessor
63 functions. Rename loop index variables for better understanding.
64 (fixup_mmaps_after_fork): Ditto.
66 2003-09-03 Christopher Faylor <cgf@redhat.com>
68 * cxx.cc (new): Fix formatting. Just return result of ccalloc rather
69 than calling memset explicitly.
71 2003-09-03 Christopher Faylor <cgf@redhat.com>
73 * exceptions.cc (set_process_mask): Set pending signals only when
74 signals become unmasked.
75 * sigproc.cc (pending_signals): Flip back to a global.
76 (wait_sig): Don't set pending signals when there is an armed semaphore
79 * shared.cc (shared_info::initialize): Add a username parameter for
80 user-mode mounts. Reorganize to try to avoid startup race.
81 (memory_init): Move some stuff into shared_info::initialize.
82 * shared_info.h (shared_info::initialize): Change declaration.
83 (CURR_SHARED_MAGIC): Update.
85 2003-09-01 Christopher Faylor <cgf@redhat.com>
87 * include/cygwin/version.h: Bump DLL minor number to 4.
89 2003-09-01 Christopher Faylor <cgf@redhat.com>
91 * net.cc (dup_ent): Restore check for NULL input.
93 2003-08-31 Christopher Faylor <cgf@redhat.com>
95 * include/sys/cygwin.h: Don't define cygwin-specific things if
98 2003-08-31 Christopher Faylor <cgf@redhat.com>
100 * cygheap.cc (cygheap_init): Allocate space for sigaction array in
102 * cygheap.h (cygheap_types): Add HEAP_SIGS.
103 * exceptions.cc (signal_fixup_after_exec): Remove from this file.
104 * pinfo.h (pinfo::getsig): Just return global_sigs array.
105 (pinfo::sigs): Delete.
106 * sigproc.cc (signal_fixup_after_exec): Move it here.
107 (global_sigs): New global array, moved from pinfo structure.
108 (sigalloc): New function. Allocate global sigaction array here.
109 (proc_subproc): Remove copysigs call. It's automatic now.
110 * include/sys/cygwin.h (PID_NOCLDSTOP): New value.
111 * signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate.
112 * sigproc.h (sigalloc): Declare.
114 * fnmatch.c (fnmatch): Use C90 parameters.
117 * fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a
120 2003-08-31 Christopher Faylor <cgf@redhat.com>
122 * net.cc (dup_ent): Make debugging output consistent.
124 2003-08-31 Christopher Faylor <cgf@redhat.com>
126 Use dup_ent rather than specific dup_*_ptr functions throughout.
128 (dup_ent): Subsume gen_ent functionality.
129 (dup_host_ptr): Delete.
130 (dup_proto_ptr): Ditto.
131 (dup_servent_ptr): Ditto.
133 2003-08-31 Christopher Faylor <cgf@redhat.com>
135 * net.cc (gen_ent): Invert sense of null check so that debug output
138 2003-08-31 Christopher Faylor <cgf@redhat.com>
140 * net.cc (free_char_list): Delete.
141 (dup_addr_list): Delete.
142 (dup_char_list): Delete.
143 (free_hostent_ptr): Delete.
144 (free_protoent_ptr): Delete.
145 (free_servent_ptr): Delete.
146 (DWORD_round): New function.
147 (strlen_round): New function. Returns strlen rounded up to word size.
148 (dup_ent): New, generic function to duplicate a {host,proto,serv}ent
150 (gen_ent): New macro. Generates a generic dup_{host,proto,serv}ent_ptr
152 (cygwin_getservbyname): Remove call to free_servent_ptr, pass
153 servent_buf to dup_servent_ptr.
154 (cygwin_getservbyport): Ditto.
155 (cygwin_gethostbyname): Ditto for hostent.
156 (cygwin_gethostbyaddr): Ditto.
157 (cygwin_getprotobyname): Ditto for protoent.
158 (cygwin_getprotobynumber): Ditto.
160 2003-08-31 Christopher Faylor <cgf@redhat.com>
162 * Makefile.in (MALLOC_OFILES): Always fill in with correct malloc
164 * configure.in: Fill in MALLOC_OFILES with either debugging or regular
166 * configure: Regenerate.
167 * dlmalloc.c: Make various fruitless changes to attempt to get to work.
169 * malloc.cc (free): Check malloc pool when debugging.
171 * path.cc (win32_device_name): Eliminate compiler warning.
173 * sigproc.cc (sig_dispatch_pending): Remove use of was_pending. Let
174 thisframe.call_signal_handler decide if handler should be called rather
175 than using bogus was_pending check.
177 * exceptions.cc (interrupt_setup): Remove accidentally checked in
180 2003-08-30 Christopher Faylor <cgf@redhat.com>
182 * heap.cc (sbrk): Save rounded addess in user_heap_max.
184 2003-08-30 Christopher Faylor <cgf@redhat.com>
186 * sigproc.cc (sig_dispatch_pending): Remove explicit call to
187 thisframe.call_signal_handler.
189 2003-08-30 Christopher Faylor <cgf@redhat.com>
191 Remove some cygserver files.
193 2003-08-28 Christopher Faylor <cgf@redhat.com>
195 * sigproc.h: Make some functions regparm.
196 * sigproc.cc (checkstate): Make regparm.
197 (getevent): Change parameters in declaration, rename from getsem, make regparm.
198 (sig_send): Recognize that nosync is now an event. Remove some old
199 cruft from previous interrupt anywhere signal handler.
200 (getevent): Change parameters in definition, rename from getsem.
201 Allocate event rather than semaphore.
202 (wait_sig): Treat sigcatch_nosync as an event.
204 2003-08-28 Christopher Faylor <cgf@redhat.com>
206 * exceptions.cc (sigreturn): Fix problem where old return address was
207 not properly restored for a nested signal.
209 2003-08-27 Christopher Faylor <cgf@redhat.com>
211 * autoload.cc (SwitchToThread): Declare as autoload function.
212 * cygthread.h (cygthread::main_thread_id): Make public.
213 * exceptions.cc (setup_handler): Remove unneeded priority stuff.
214 Rename label to reflect what it does. Add debugging for idiotic
215 Windows NT problem. Change debugging output to include signal number.
216 * miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread
217 function to give time slice to other threads.
218 * wincap.cc: Properly define have_switch_to_thread throughout.
219 * wincap.h (wincap::switch_to_thread): New element.
221 2003-08-27 Christopher Faylor <cgf@redhat.com>
223 * syscalls.cc (mount): Don't check win32_path when doing cygdrive
226 2003-08-27 Christopher Faylor <cgf@redhat.com>
228 * specdir: Correctly remove temporary directory prior to use.
230 2003-08-27 Christopher Faylor <cgf@redhat.com>
232 * sigproc.cc (wait_sig): Count number of iterations through
233 'more_signals' loop and issue a warning if DEBUGGING and excessive.
234 (WFSO): When debugging and infinite timeout, loop.
236 2003-08-26 Corinna Vinschen <corinna@vinschen.de>
238 * include/cygwin/stat.h: Allow definition of internal stat structures
239 also when compiling newlib.
241 2003-08-25 Christopher Faylor <cgf@redhat.com>
243 Throughout, change USE_CYGSERVER to USE_SERVER.
244 * Makefile.in (LIBSERVER): Define and use.
245 * configure.in: Set LIBSERVER as appropriate.
246 * configure: Regenerate.
247 * acconfig.h: Regenerate.
248 * environ.cc: Rename allow_daemon to allow_server. Only recognize when
249 USE_SERVER is defined.
251 2003-08-23 Christopher Faylor <cgf@redhat.com>
253 * syscalls.cc (_remove_r): Define.
255 2003-08-22 Corinna Vinschen <corinna@vinschen.de>
257 * cygheap.h (enum cygheap_types): Add HEAP_MMAP.
258 (CYGHEAPSIZE): Add another 64K.
259 * mmap.cc: Use cmalloc, ccalloc and crealloc with HEAP_MMAP type
262 2003-08-22 Christopher Faylor <cgf@redhat.com>
264 * cygheap.cc (user_heap_info::max): New field.
265 * heap.cc (heap_init): Save pointer to end of heap reserved memory.
266 (sbrk): Don't attempt to commit memory beyond end of heap reserved
267 memory. Attempt to honor comment and reserve commitbytes if heapchunk
270 2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
272 * exceptions.cc (sigreturn): Don't clobber ebp in recursive signal
275 2003-08-22 Christopher Faylor <cgf@redhat.com>
277 * exceptions.cc (sig_handle): Change so that default signals indicate
280 2003-08-21 Christopher Faylor <cgf@redhat.com>
282 * sigproc.cc (wait_sig): Remove redundant test in do/while.
284 2003-08-21 Christopher Faylor <cgf@redhat.com>
286 * sigproc.cc (wait_sig): Avoid infinite loop.
288 2003-08-20 Christopher Faylor <cgf@redhat.com>
290 * speclib: Reenable removal of temp files.
292 2003-08-20 Christopher Faylor <cgf@redhat.com>
294 * miscfuncs.cc (low_priority_sleep): Sleep at same priority as main
296 * sigproc.cc (wait_sig): Keep looping if there are more signals to
297 consider and we are flushing signals.
298 (sig_send): Put nonsync signals in the correct bucket.
300 2003-08-20 Christopher Faylor <cgf@redhat.com>
302 * speclib: Fix created lib to avoid "File truncated" problems.
304 2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
306 * exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a
309 2003-08-20 Christopher Faylor <cgf@redhat.com>
311 * sigproc.cc (wait_sig): Ensure that myself->getsigtodo array is
312 flushed on a __SIGFLUSH.
314 2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
315 Christopher Faylor <cgf@redhat.com>
317 * exceptions.cc (_sigreturn): Handle nested signals without growing the
320 2003-08-19 Christopher Faylor <cgf@redhat.com>
322 * exceptions.cc (pending_signals): Remove unneeded declaration.
323 * sigproc.cc (pending_signals): Make static.
324 (wait_sig): Use defined values rather than integers for rc. Never scan
325 both todo arrays as this could cause hangs if signals arrive from two
326 different sources. Rename saw_pending_signals to saw_failed_interrupt.
327 Exit loop when signal found. Enter low-priority sleep, if necessary,
328 after finished signalling completion. Set pending_signals when blocked
329 (from Pierre Humblet).
331 2003-08-19 Christopher Faylor <cgf@redhat.com>
333 * signal.cc (sigpending): Move.
334 * sigproc.cc (sigpending): To here.
335 (getlocal_sigtodo): Return process-local signal array.
336 (sigpending): Accommodate new process-local signal array.
338 (sig_set_pending): Ditto.
341 2003-08-19 Christopher Faylor <cgf@redhat.com>
343 Throughout, eliminate argument to sig_dispatch_pending.
344 * exceptions.cc (setup_handler): Move non-interruptible condition
345 handling (back) to wait_sig.
346 (set_process_mask): Don't worry about calling sig_dispatch_pending from
347 sigthread since it is detected in the function anyway.
348 (sig_handle): Eliminate thisproc arg. Don't call sig_dispatch_pending
349 on SIGCONT since that should happen automatically.
350 * sigproc.cc (sig_dispatch_pending): Eliminate justwake argument. Just
351 return when called from sigthread.
352 (wait_sig): Change some variables to bool. Change inner while to an
353 if. Move uninterruptible signal handling here.
354 (sigproc_terminate): Don't call sig_dispatch_pending. Just increment
357 * speclib: Use slightly different (but still flawed) method for
358 determining symbols to extract from libraries.
360 2003-08-18 Christopher Faylor <cgf@redhat.com>
362 * exceptions.cc (sigdelayed): Fix race where signal handler could get
363 the wrong mask (as suggested by Pierre Humblet).
365 2003-08-18 Christopher Faylor <cgf@redhat.com>
367 * path.cc (mount): Add null/empty check for input parameters.
368 (umount): Add null/empty check for input parameters.
370 2003-08-17 Pierre Humblet <pierre.humblet@ieee.org>
372 * grp.cc (read_group): Revert previous change.
373 * uinfo.cc (pwdgrp::load): Always reset curr_lines.
375 2003-08-17 Corinna Vinschen <corinna@vinschen.de>
377 * errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.
378 * fhandler_raw.cc (fhandler_dev_raw::raw_read): Set more accurate
379 errnos instead of EACCES.
380 (fhandler_dev_raw::raw_write): Ditto.
382 2003-08-17 Christopher Faylor <cgf@redhat.com>
384 * path.cc (special_name): Accommodate all special names with
387 2003-08-15 Corinna Vinschen <corinna@vinschen.de>
389 * mmap.cc (mmap64): Avoid crash if file size is less than requested
392 2003-08-13 Igor Pechtchanski <pechtcha@cs.nyu.edu>
394 * path.cc (special_name): Add checks for some specials followed by
395 a "." and a FIXME comment.
397 2003-08-13 Corinna Vinschen <corinna@vinschen.de>
399 * cygwin.din: Accommodate change from cygwin_lstat to lstat.
400 * syscalls.cc: Add defines to avoid declaration issues when
401 renaming cygwin_lstat back to lstat.
402 (lstat): Reverted name change from cygwin_lstat.
404 2003-08-12 Corinna Vinschen <corinna@vinschen.de>
406 * include/sys/param.h (NBBY): Define if not defined.
408 2003-08-12 Nicholas Wourms <nwourms@netscape.net>
410 * include/sys/param.h (setbit): Add new bitmap related macro.
414 (howmany): Add new counting/rounding macro.
415 (rounddown): Likewise.
417 (roundup2): Likewise.
419 (MIN): Add macro for calculating min.
420 (MAX): Add macro for calculating max.
422 2003-08-09 Christopher Faylor <cgf@redhat.com>
424 * include/cygwin/version.h: Bump DLL minor number to 3.
426 2003-08-08 Gerrit P. Haase <gp@familiehaase.de>
428 * include/stdint.h: Correctly define INT32_MIN.
430 2003-08-08 David Rothenberger <daveroth@acm.org>
432 * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr
433 after free() is called.
435 2003-08-05 Christopher Faylor <cgf@redhat.com>
437 * Makefile.in: Rework to accommodate new speclib arguments.
438 * speclib: Rework to extract everything from libcygwin.a rather than
439 building things from existing object files.
441 2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
443 * path.cc (cygdrive_getmntent): Do not skip over drives of type
446 2003-08-05 Christopher Faylor <cgf@redhat.com>
448 * fhandler.cc (fhandler_base::lseek): Be more paranoid when
449 constructing offsets from 64 bit value.
450 * syscalls.cc (logout): Avoid temp buffer memcpy since new scheme does
452 (utmp_data): Rework as a macro which returns a pointer into a buffer.
453 (getutent): Use new buffer allocation mechanism to grab a utmp buffer.
457 2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
459 * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Do not change
460 'errno' if end of directory condition is encountered as per SUSv2.
461 * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
462 * fhandler_process (fhandler_process::readdir): Ditto.
463 * fhandler_registry (fhandler_registry::readdir): Ditto.
465 2003-07-30 Christopher Faylor <cgf@redhat.com>
467 * dcrt0.cc (_dll_crt0): Move strace.microseconds initialization to
468 after pthread initialization.
469 (dll_crt0_1): i.e., here.
471 2003-07-28 Christopher Faylor <cgf@redhat.com>
473 * fhandler_base.cc (fhandler_base::readv): Rework to properly return
474 number of bytes from read.
476 2003-07-28 Christopher Faylor <cgf@redhat.com>
478 * include/cygwin/version.h: Bump DLL minor number to 2.
480 2003-07-26 Christopher Faylor <cgf@redhat.com>
482 * exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if
483 there is a tty associated with the process. Send SIGHUP on
486 * fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open
487 handle counter regardless of whether this is a pty or tty.
488 (fhandler_tty_slave::open): Ditto.
489 (fhandler_tty_slave::dup): Ditto.
490 (fhandler_tty_common::set_close_on_exec): Ditto.
491 (fhandler_tty_master::init_console): Decrement console open handle
492 counter after init since it will now be handled by all tty open.
493 * syscalls.cc (setsid): Rework debugging output slightly.
495 2003-07-25 Christopher Faylor <cgf@redhat.com>
497 * configure.in: Use 'install-sh -c'.
498 * configure: Regenerate.
500 2003-07-25 Christopher Faylor <cgf@redhat.com>
502 * configure.in: Always use install-sh.
503 * configure: Regenerate.
505 2003-07-25 Christopher Faylor <cgf@redhat.com>
507 * include/cygwin/socket.h: Conditionalize [AP]F_INET6 define.
509 2003-07-25 Christopher Faylor <cgf@redhat.com>
511 * Makefile.in (OBSOLETE_FUNCTION): Add fdopen.
513 2003-07-25 Christopher Faylor <cgf@redhat.com>
515 * cygwin.din: Export _fdopen64
516 * Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
517 * include/cygwin/version.h: Bump api minor number.
519 * ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT
522 2003-07-24 Christopher Faylor <cgf@redhat.com>
524 * environ.cc (check_case_init): Use strncasematch.
526 * cygwin.din: Export __mempcpy.
527 * cygwin/version.h: Bump api minor number.
529 2003-07-21 Pavel Tsekov <ptsekov@gmx.net>
531 * mmap.cc: Use proper format specifiers for _off64_t and size_t in
532 format strings passed to syscall_printf () and debug_printf ()
535 2003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
537 * security.cc (verify_token): Fix white space and style.
538 Use type bool instead of BOOL and char. Use alloca
539 instead of malloc and free for my_grps.
541 2003-07-17 Corinna Vinschen <corinna@vinschen.de>
543 * sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
546 2003-07-14 Corinna Vinschen <corinna@vinschen.de>
548 * cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
550 * syscalls.cc (seteuid32): Ditto. Set new_token to process token if
551 process token is suitable.
552 * uinfo.cc (uinfo_init): Initialize tokens in cygheap user info
553 to INVALID_HANDLE_VALUE.
555 2003-07-14 Pierre Humblet <pierre.humblet@ieee.org>
557 * cygheap.h (enum impersonation): Delete.
558 (cygheap_user::impersonation_state): Delete.
559 (cygheap_user::current_token): New.
560 (cygheap_user::issetuid): Modify to use current_token.
561 (cygheap_user::token): Ditto.
562 (cygheap_user::deimpersonate): Ditto.
563 (cygheap_user::reimpersonate): Ditto.
564 (cygheap_user::has_impersonation_tokens): Ditto.
565 (cygheap_user::close_impersonation_tokens): Ditto.
566 * security.cc (cygwin_set_impersonation_token): Always set the token.
567 (verify_token): Change type of gsid to cygpsid.
568 (get_file_attribute): Use the effective ids.
569 * syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
570 * uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
572 2003-07-12 Christopher Faylor <cgf@redhat.com>
574 * pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
575 communicating pid actually stops eventually.
577 2003-07-10 Christopher Faylor <cgf@redhat.com>
579 * path.cc (get_device_number): Remove special com? consideration.
580 (special_chars): Make static.
581 (special_introducers): New.
582 (special_char): Allow specified valid_chars args.
583 (fnunmunge): Handle aux-like filenames correctly.
584 (special_name): Add con, conin$, conout$.
585 (mount_item::fnmunge): Use __small_sprintf return value to calculate
588 2003-07-09 Christopher Faylor <cgf@redhat.com>
590 * include/cygwin/version.h: Bump DLL minor number to 1.
592 2003-07-09 Christopher Faylor <cgf@redhat.com>
594 * fhandler_proc.cc (format_proc_stat): Use correctly sized constants
595 for filling in zeros on 98.
597 2003-07-09 Christopher Faylor <cgf@redhat.com>
599 * fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space
601 (format_proc_stat): Reorganize to accumulate and report on all cpus.
603 2003-07-09 Christopher Faylor <cgf@redhat.com>
605 * sysconf.cc (sysconf): Return processors online rather than bitmask
606 for _SC_NPROCESSORS_ONLN.
608 2003-07-08 Christopher Faylor <cgf@redhat.com>
610 * cygheap.cc (creturn): Set appropriate errno when out of memory.
611 (ccalloc): Only issue system_printf when debugging.
612 * dtable.cc (dtable::extend): Only allocate 100 * the incremental growth
613 size max. Set errno appropriately.
614 (dtable::build_fhandler): Check for error from set_name.
615 * fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
616 * fhandler.h (fhandler_base::set_name): Change to bool.
617 * fhandler_process.cc (format_process_stat): Fix formatting.
618 * resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
619 * sysconf.cc (sysconf): Ditto.
621 2003-07-07 Christopher Faylor <cgf@redhat.com>
623 * rmsym: Don't use ranlib.
625 2003-07-07 Christopher Faylor <cgf@redhat.com>
627 * newsym: Reenable removal of tmp directory. Just use ar to generate
629 * Makefile.in: Don't send ranlib to newsym or rmsym.
631 2003-07-07 Christopher Faylor <cgf@redhat.com>
633 * newsym: Create objects that are closer to those created by dlltool so
634 as not to confuse --export-all-symbols.
635 * rmsym: Be a little more accepting of object filenames now that
636 dlltool can create different format files.
638 2003-07-06 Christopher Faylor <cgf@redhat.com>
640 * newsym: Oops. Revert below change.
642 2003-07-06 Christopher Faylor <cgf@redhat.com>
644 * newsym: Use correct prefix for generating imports.
645 * pinfo.cc (_pinfo::commune_send): Don't wait forever for a response
646 from another process.
648 2003-07-06 Christopher Faylor <cgf@redhat.com>
650 * syscalls.cc (gethostid): Set thread affinity so that results are
653 2003-07-05 Corinna Vinschen <corinna@vinschen.de>
655 * mmap.cc (list::match): Add parameters to return valid address and
656 length back to munmap(). Evaluate intersection between given
657 area and mapped area and return it, if any.
658 (mmap64): On regular files, don't allow mappings beginning beyond
659 EOF. Return with errno set to ENXIO instead.
660 (munmap): Rewrite SUSv3 conformant. Check if given memory area is
661 valid. Unmap all maps inside given memory area. Don't return error
662 if no mapping has been unmapped.
664 2003-07-05 N Stephens <nigel@mips.com>
666 * fhandler.h (fhandler_socket::get_connect_state): New method to
667 return socket connection state.
668 * fhandler_socket.cc (dup): Copy socket connect state to new file
670 * net.cc (cygwin_rcmd): Mark file handles of sockets returned by
671 rcmd() as CONNECTED state.
672 (cygwin_rexec): Similarly for rexec().
673 (socketpair): Mark both ends of a new socket pair as CONNECTED.
675 2003-07-04 Corinna Vinschen <corinna@vinschen.de>
677 * mmap.cc (fhandler_disk_file::mmap): Fix address test.
679 2003-07-03 Christopher Faylor <cgf@redhat.com>
681 * path.cc (fillout_mntent): Change "posix" to "managed".
683 2003-07-02 Christopher Faylor <cgf@redhat.com>
685 * fhandler.h (FH_ENC): New enum.
686 (fhandler_base::get_encoded): New function.
687 (fhandler_base::set_encoded): Ditto.
688 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag
689 in fhandler, as appropriate.
690 (fhandler_disk_file::readdir): Unmunge filename as appropriate based on
692 * path.cc (normalize_posix_path): Don't punt on files with colons.
693 (special_char): New function.
694 (mount_item::fnmunge): Ditto.
696 (special_name): Ditto.
697 (mount_item::build_win32): Avoid drive considerations when file is
699 (mount_info::conv_to_win32_path): Handle encoded filenames.
700 (mount_info::conv_to_posix_path): Ditto.
701 (fillout_mntent): Add posix string when directory is encoded.
702 * path.h (fnunmunge): Declare.
703 (path_conv::is_encoded): Declare.
705 2003-07-03 Christopher Faylor <cgf@redhat.com>
707 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
708 more of the cygserver stuff so that ttys actually work.
710 2003-07-03 Corinna Vinschen <corinna@vinschen.de>
712 * mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
713 If a non-zero addr is given, align it to the next lower 64K boundary.
714 (fhandler_disk_file::mmap): If a non-zero address is given, try
715 mapping using the given address first. If it fails and flags is not
716 MAP_FIXED, try again with NULL address.
718 2003-07-01 Christopher Faylor <cgf@redhat.com>
720 * thread.cc: Remove _MT_SAFE conditional.
722 2003-07-01 Christopher Faylor <cgf@redhat.com>
724 * configure.in: Fix --enable-server option.
725 * configure: Regenerate.
727 2003-07-01 Christopher Faylor <cgf@redhat.com>
729 * Makefile.in: Remove cygserver stuff.
730 * acconfig.h: Add USE_CYGSERVER define.
731 * config.h.in: Regenerate.
732 * configure.in: Add --enable-server setting.
733 * configure: Regenerate.
734 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
735 compilation of cygserver stuff.
736 * fork.cc (fork_child): Ditto.
738 * tty.cc (tty::common_init): Ditto.
740 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
744 * security.cc: Ditto.
746 * syscalls.cc (check_posix_perm): Remove externs that were already
747 declared in a header.
748 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
749 cygwin should always be _MT_SAFE.
751 2003-07-01 Christopher Faylor <cgf@redhat.com>
753 * thread.cc: Remove _MT_SAFE conditional.
755 2003-07-01 Christopher Faylor <cgf@redhat.com>
757 * configure.in: Fix --enable-server option.
758 * configure: Regenerate.
760 2003-07-01 Christopher Faylor <cgf@redhat.com>
762 * Makefile.in: Remove cygserver stuff.
763 * acconfig.h: Add USE_CYGSERVER define.
764 * config.h.in: Regenerate.
765 * configure.in: Add --enable-server setting.
766 * configure: Regenerate.
767 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
768 compilation of cygserver stuff.
769 * fork.cc (fork_child): Ditto.
771 * tty.cc (tty::common_init): Ditto.
773 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
777 * security.cc: Ditto.
779 * syscalls.cc (check_posix_perm): Remove externs that were already
780 declared in a header.
781 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
782 cygwin should always be _MT_SAFE.
784 2003-06-30 Pierre Humblet <pierre.humblet@ieee.org>
786 * cygheap.h (enum impersonation): New enum.
787 (cygheap_user::token): Delete.
788 (cygheap_user::impersonated): Delete.
789 (cygheap_user::external_token): New member.
790 (cygheap_user::internal_token): New member.
791 (cygheap_user::impersonation_state): New member.
792 (cygheap_user::issetuid): Modify.
793 (cygheap_user::token): New method.
794 (cygheap_user::deimpersonate): New method.
795 (cygheap_user::reimpersonate): New method.
796 (cygheap_user::has_impersonation_tokens): New method.
797 (cygheap_user::close_impersonation_tokens): New method.
798 * dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
799 * fhandler_socket.cc (fhandler_socket::dup): Ditto.
800 * fork.cc (fork_child): Ditto.
801 (fork_parent): Ditto.
802 * grp.cc (internal_getgroups): Ditto.
803 * security.cc (verify_token): Ditto.
804 (check_file_access): Ditto.
805 (cygwin_set_impersonation_token): Detect conflicts. Set
807 * spawn.cc (spawn_guts): Use new cygheap_user methods.
808 * syscalls.cc (seteuid32): Rearrange to use the two tokens
810 (setegid32): Use new cygheap_user methods.
811 * uinfo.cc: (internal_getlogin): Ditto.
813 2003-06-25 Doru Carastan <doru.carastan@mvista.com>
815 * Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL.
817 2003-06-24 Thomas Pfaff <tpfaff@gmx.net>
819 * thread.cc (MTinterface::fixup_after_fork): Fix thread list after
821 (pthread::threads): Instantiate.
822 (pthread::pthread): Initialize running and suspendend.
823 Initialize next with NULL.
824 Add thread to thread list if it is not the null_pthread.
825 (pthread::~pthread): Remove thread from thread list if it is
826 not the null_pthread.
827 (pthread::postcreate): Set running flag.
828 (pthread::exit): Reset running flag.
829 (pthread::cancel): Try to cancel thread only if still running.
830 (pthread::_fixup_after_fork): Implement.
831 (pthread::detach): Check if thread is still running before detach.
832 * thread.h (pthread::running): New member.
833 (pthread::next): Ditto.
834 (pthread::fixup_after_fork): New static method.
835 (pthread::threads): New static method.
836 (pthread::_fixup_after_fork): New method.
838 2003-06-20 Christopher Faylor <cgf@redhat.com>
840 * pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a
841 pure windows process.
843 2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
845 * autoload.cc (GetNetworkParams): Add.
846 * net.cc (getdomainname): Call GetNetworkParams and read the
847 DhcpDomain registry value if warranted.
849 2003-06-17 Christopher Faylor <cgf@redhat.com>
851 * path.cc (mount): Do more strict checking on posix path arguments.
853 2003-06-15 Christopher Faylor <cgf@redhat.com>
855 Throughout, remove "include <errno.h>" from files which already include
858 2003-06-15 Thomas Pfaff <tpfaff@gmx.net>
860 * include/cygwin/config.h (__DYNAMIC_REENT__): Define.
861 * include/cygwin/version.h: Bump API minor version.
862 * cygwin.din: Export __getreent
863 * cygerrno.h: Include errno.h. Fix places where _impure_ptr is used
864 directly to store the errno value.
865 * debug.cc (__set_errno): Ditto.
866 * errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
867 * signal.cc: Rename _reent_clib to _REENT throughout.
868 * thread.h (reent_clib): Remove prototype.
869 * thread.cc (reent_clib): Rename reent_clib to __getreent. Return
870 _impure_ptr until MTinterface is initialized.
871 (reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL
873 * MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to
874 keep signal handling running when fork is called from a thread other
877 2003-06-12 Thomas Pfaff <tpfaff@gmx.net>
879 * thread.cc (pthread_attr_init): Revert change from 2003-06-11
880 to return 0 if attribute is already initialized back to EBUSY.
881 (pthread_condattr_init): Ditto.
882 (pthread_rwlockattr_init): Ditto.
883 (pthread_mutexattr_init): Ditto.
885 2003-06-12 Corinna Vinschen <corinna@vinschen.de>
887 * exceptions.cc (ctrl_c_handler): Don't send a signal on
888 CTRL_SHUTDOWN_EVENT. Add a comment to rationalize the patch.
890 2003-06-11 Thomas Pfaff <tpfaff@gmx.net>
892 * thread.cc (pthread_attr_init): Return 0 if attribute is already
894 Fix return code if out of memory.
895 (pthread_condattr_init): Ditto.
896 (pthread_rwlockattr_init): Ditto.
897 (pthread_mutexattr_init): Return 0 if attribute is already
900 2003-06-09 Pierre Humblet <pierre.humblet@ieee.org>
902 * spawn.cc (spawn_guts): Call CreateProcess while impersonated,
903 when the real {u,g}ids and the groups are original.
904 Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
905 * uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
906 while impersonated, preserve the uids and gids and call
907 ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.
909 * exceptions.cc (error_start_init): Quote the pgm in the command.
911 2003-06-07 Christopher Faylor <cgf@redhat.com>
913 * poll.cc: Define FD_SETSIZE to ridiculously large number so that there
914 will be no artificially small limits.
916 2003-06-07 Christopher Faylor <cgf@redhat.com>
918 * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when
921 2003-06-07 Thomas Pfaff <tpfaff@gmx.net>
923 * fhandler_socket.cc (fhandler_socket::connect): Change error
924 handling for nonblocking connects to return EALREADY when
925 connect is called more than once for the same socket.
927 2003-06-06 Corinna Vinschen <corinna@vinschen.de>
929 * cygwin.din: Add vsyslog.
930 * fhandler.cc (fhandler_base::write): Only make file sparse if the
931 seeked area is >= 128K.
932 * syslog.cc (vsyslog): New function, overtaking functionality from
934 (syslog): Just call vsyslog.
935 * include/cygwin/version.h: Bump API minor.
936 * include/sys/syslog.h: Add vsyslog declaration.
938 2003-06-05 Christopher Faylor <cgf@redhat.com>
940 * cygthread.cc (cygthread::terminate_thread): Change system_printf to
943 2003-06-04 Christopher Faylor <cgf@redhat.com>
945 * shared.cc (shared_info::heap_chunk_size): Be really defensive about
946 making sure that heap_chunk is set.
948 2003-06-04 Christopher Faylor <cgf@redhat.com>
950 * path.cc (conv_path_list): Use correct value when calculating length
951 to avoid a potential SEGV.
953 2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
955 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
956 as non-executable if the file cannot be opened for read. Retry query
957 open only if errno is EACCES. Never change the mode, even if it is 000
958 when query open() fails.
960 2003-06-03 Christopher Faylor <cgf@redhat.com>
962 * configure.in: Allow any i?86 variant.
963 * configure: Regenerate.
965 2003-06-03 Corinna Vinschen <corinna@vinschen.de>
966 Thomas Pfaff <tpfaff@gmx.net>
968 * fhandler_socket.cc (connect_thread): Remove.
969 (accept_thread): Remove.
970 (fhandler_socket::connect): Remove all special blocking handling.
971 (fhandler_socket::accept): Ditto.
972 * net.cc (cygwin_connect): Make blocking sockets temporarily
973 non-blocking and call cygwin_select on them to be interruptible.
974 (cygwin_accept): Ditto.
976 2003-06-02 Christopher Faylor <cgf@redhat.com>
978 * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist.
980 2003-06-02 Christopher Faylor <cgf@redhat.com>
982 * cygthread.h (cygthread::terminate_thread): Mark private.
983 * cygthread.cc (cygthread::terminate_thread): Deallocate free_range
986 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
988 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
989 to `interrupted' as used in fhandler_socket::connect.
991 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
993 * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
995 (fhandler_socket::accept): Ditto.
997 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
999 * fhandler_socket.cc: Include cygthread.h.
1000 (class sock_event): Remove.
1001 (thread_connect): New function.
1002 (thread_accept): Ditto.
1003 (fhandler_socket::connect): Use cygthread instead of socket event
1004 handling for blocking sockets.
1005 (fhandler_socket::accept): Ditto.
1007 2003-06-02 Christopher Faylor <cgf@redhat.com>
1009 * fhandler.cc (fhandler_base::write): Correct minor printf formatting
1012 2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
1014 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
1015 an existing directory is a root if FindFirstFile fails.
1017 2003-05-30 Christopher Faylor <cgf@redhat.com>
1019 * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
1020 was actually valid. Fix it.
1022 2003-05-30 Christopher Faylor <cgf@redhat.com>
1024 * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
1027 * path.cc (path_conv::check): Rework has_acls logic slightly. Uncouple
1028 exec tests away from filesystem tests.
1030 2003-05-30 Corinna Vinschen <corinna@vinschen.de>
1032 * include/sys/param.h: Add DEV_BSIZE.
1034 2003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
1035 Corinna Vinschen <corinna@vinschen.de>
1037 * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
1040 2003-05-28 Christopher Faylor <cgf@redhat.com>
1042 * mkvers.sh: Avoid "-dontuse" tags.
1044 * path.cc (path_conv::check): Set exec state based on known situations.
1046 * path.cc (mount_item::fnmunge): New function.
1047 (mount_item::build_win32): New function.
1048 (mount_info::conv_to_win32_path): Use build_win32 to build windows
1050 * path.h (mount_item::fnmunge): Declare new function.
1051 (mount_item::build_win32): Ditto.
1052 * sys/mount.h (MOUNT_ENC): Define.
1054 2003-05-28 Corinna Vinschen <corinna@vinschen.de>
1056 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
1057 revert to original account before calling fixup_before_fork_exec
1058 and impersonate again afterwards. Change comment accordingly.
1059 Clean up error handling and debug output.
1061 2003-05-27 Thomas Pfaff <tpfaff@gmx.net>
1063 * fhandler_socket.cc (sock_event::~sock_event): New method.
1064 (sock_event::load): Change to void. Check if winsock2 is available.
1065 (socke_event::wait): Return 0 if interruptible mode is not available.
1066 (fhandler_socket::connect): Remove checks for winsock2 availability.
1067 (fhandler_socket::accept): Ditto.
1069 2003-05-27 Corinna Vinschen <corinna@vinschen.de>
1071 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
1072 using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
1074 2003-05-27 Bill C. Riemers <cygwin@docbill.net>
1076 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
1077 permissions through umask on FAT or if ntsec is off.
1079 2003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
1081 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
1083 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
1085 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
1086 instead of numeric constant.
1088 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
1090 * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
1091 sock_event methods by a check for WinSock2 availability.
1092 (fhandler_socket::accept): Ditto.
1094 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
1096 * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
1097 (fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
1098 (fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
1099 (fhandler_base::set_fs_flags): New method.
1100 (fhandler_base::get_fs_flags): Ditto.
1101 * fhandler.cc (fhandler_base::write): Make 64 bit clean. Convert file
1102 to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
1103 (fhandler_base::lseek): Call set_did_lseek() instead of
1104 set_check_win95_lseek_bug().
1105 (fhandler_base::fhandler_base): Initialize fs_flags to 0.
1106 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
1107 as "sparse" unconditionally. Set fs_flags member.
1109 2003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
1111 * autoload.cc (GetDiskFreeSpaceEx): Add.
1112 * syscalls.cc (statfs): Call full_path.root_dir() instead of
1113 rootdir(full_path). Use GetDiskFreeSpaceEx when available and
1114 report space available in addition to free space.
1115 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
1116 Do not call FindFirstFile for disk root directories.
1118 2003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
1120 * fhandler_process.cc (format_process_stat): Use PagefileUsage
1121 instead of VirtualSize.
1122 (get_mem_values): Ditto.
1124 2003-05-21 Corinna Vinschen <corinna@vinschen.de>
1126 * shared_info.h: Match shared_name declaration with below change.
1127 * shared.cc (shared_name): Use incoming char * parameter instead of
1128 local static buffer.
1129 (open_shared): Accommodate new calling convention for shared_name.
1130 * exceptions.cc (events_init): Ditto.
1131 * sigproc.cc (getsem): Ditto.
1132 * syscalls.cc (login): Ditto.
1136 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
1138 * fhandler_socket.cc (secret_event_name): Return void. Use incoming
1139 char * parameter instead of local static buffer.
1140 (fhandler_socket::create_secret_event): Accommodate new calling
1141 convention for secret_event_name.
1142 (fhandler_socket::close_secret_event): Ditto.
1144 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
1146 * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
1147 (ENTROPY_SOURCE_NAME): Ditto.
1148 (secret_event_name): New static function. Create shared event name
1149 with "Global\" prefix on systems supporting terminal services.
1150 (fhandler_socket::set_connect_secret): Fix conditional.
1151 (fhandler_socket::create_secret_event): Create secret event using
1152 secret_event_name().
1153 (fhandler_socket::close_secret_event): Ditto.
1154 * shared.cc (shared_name): Create shared object name with "Global\"
1155 prefix on systems supporting terminal services.
1156 * wincap.cc: Set has_terminal_services capability throughout.
1157 (wincap_2003): New global object representing Windows 2003 Server
1159 (wincapc::init): Accommodate Windows 2003 Server.
1160 * wincap.h (struct wincaps): Add has_terminal_services capability.
1162 2003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
1164 * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
1165 * winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
1166 * winsup/cygwin/cygwin.din: Add ftok, _ftok.
1167 * winsup/cygwin/ipc.cc (ftok): Rework implementation.
1169 2003-05-18 Joe Buehler <jhpb@hekimian.com>
1171 * spawn.cc (spawn_guts): Show more of command line in strace output.
1173 2003-05-15 Thomas Pfaff <tpfaff@gmx.net>
1175 * thread.h (pthread::init_mainthread): Remove function parameter.
1176 (MTinterface::Init): Ditto.
1177 * thread.cc (MTinterface::Init): Remove function parameter.
1178 Always initialize reent_key.
1179 (pthread::init_mainthread): Remove function parameter.
1180 (MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
1181 * dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
1182 pthread::init_mainthread.
1183 Call pthread::init_mainthread only when not forked.
1185 2003-05-15 Corinna Vinschen <corinna@vinschen.de>
1187 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
1190 2003-05-13 Corinna Vinschen <corinna@vinschen.de>
1192 * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
1194 2003-05-12 Corinna Vinschen <corinna@vinschen.de>
1196 * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
1197 * fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
1198 * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
1199 * ipc.cc (ftok): Use stat64.
1200 * syscalls.cc (_fstat64): Remove alias.
1203 (_fstat64_r): New function.
1207 * crt0.o: New file, moved from newlib.
1208 * include/sys/param.h: Ditto.
1209 * include/sys/utime.h: Ditto.
1210 * include/sys/utmp.h: Ditto.
1211 * include/sys/dirent.h: Ditto. Expose different struct dirent,
1212 dependening of the environment.
1214 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
1216 Replace ino_t by __ino64_t throughout.
1218 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
1220 * include/cygwin/types.h: Add key_t typedef.
1222 2003-05-10 Christopher Faylor <cgf@redhat.com>
1224 * dir.cc (readdir): Fill out new old_d_ino field.
1225 * fhandler.h (fhandler_base::namehash): Define as ino_t.
1226 (fhandler_base::get_namehash): Ditto.
1227 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
1229 * fhandler_socket.cc (fhandler_socket::fstat): Ditto.
1230 * path.cc (hash_path_name): Return ino_t.
1231 * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
1232 * winsup.h (hash_path_name): Declare as returning ino_t.
1233 * include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
1234 (__stat64): Use 64 bit st_ino.
1235 * include/cygwin/types.h (__ino64_t): Define.
1237 (ino_t): Define appropriately.
1239 2003-05-10 Corinna Vinschen <corinna@vinschen.de>
1241 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
1243 * cygwin.din: Ditto.
1244 * include/cygwin/version.h: Bump API minor number.
1246 2003-05-09 Corinna Vinschen <corinna@vinschen.de>
1248 * include/cygwin/config.h: New file.
1250 2003-05-09 Christopher Faylor <cgf@redhat.com>
1252 * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
1253 completion over waiting for signal delivery.
1255 2003-05-06 Thomas Pfaff <tpfaff@gmx.net>
1257 * signal.cc (nanosleep): Do not wait twice for signal arrival.
1259 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
1261 * include/cygwin/types.h: Fix erroneous definition of ino_t from
1264 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
1266 * syscalls.cc (chown_worker): Allow chown'ing of socket files.
1268 2003-04-30 Thomas Pfaff <tpfaff@gmx.net>
1270 * Makefile.in: Revert patch from 2003-04-17.
1272 2003-04-28 Brian Ford <ford@vss.fsi.com>
1274 * profil.h (PROFADDR): Prevent overflow when text segments are larger
1276 * profil.c (profthr_func): Raise thread priority for more accurate
1279 2003-04-26 Christopher Faylor <cgf@redhat.com>
1281 * path.cc (hash_path_name): Use ino_t as type.
1283 2003-04-26 Christopher Faylor <cgf@redhat.com>
1285 * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
1288 2003-04-25 Corinna Vinschen <corinna@vinschen.de>
1290 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
1291 to allow standalone usage (autoconf).
1293 2003-04-23 Christopher Faylor <cgf@redhat.com>
1295 * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
1298 2003-04-22 Christopher Faylor <cgf@redhat.com>
1300 * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
1301 called for successful non-blocking pipe reads.
1303 2003-04-22 Corinna Vinschen <corinna@vinschen.de>
1305 * include/inttypes.h: New file.
1306 * include/stdint.h: New file.
1307 * include/cygwin/in.h: Include stdint.h instead of sys/types.h.
1308 * include/cygwin/types.h: Include stdint.h. Remove typedefs for
1309 intN_t and uintN_t since these are defined in stdint.h now.
1311 2003-04-21 Christopher Faylor <cgf@redhat.com>
1313 * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
1314 minor number to 0. Bump API minor number.
1316 2003-04-20 Corinna Vinschen <corinna@vinschen.de>
1318 * autoload.cc (CreateWindowStationA): Add.
1319 (SetProcessWindowStation): Add.
1321 2003-04-19 Christopher Faylor <cgf@redhat.com>
1323 * wincap.h (wincaps:pty_needs_alloc_console): New element.
1324 (wincapc:pty_needs_alloc_console): New function.
1325 * wincap.cc: Add pty_needs_alloc_console throughout.
1326 * fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
1327 console on first pty allocation.
1329 2003-04-18 Christopher Faylor <cgf@redhat.com>
1331 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
1332 whenever a pty is allocated.
1334 2003-04-18 Christopher Faylor <cgf@redhat.com>
1336 * Makefile.in: Use ${nostdlib} variable.
1338 2003-04-18 Diego Biurrun <diego@biurrun.de>
1340 * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
1341 id" string to "vendor_id" to conform with Linux systems.
1343 2003-04-17 Christopher Faylor <cgf@redhat.com>
1345 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
1347 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
1349 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
1350 * autoload.cc (LoadDLLprime): Rename std_dll_init to
1352 (std_dll_init): Remove name mangling prototype. Add attributes
1354 (wsock_init): Ditto.
1355 Change wsock_init to _wsock_init in wsock32 and ws2_32
1357 * exceptions.cc (unused_sig_wrapper): Remove prototype. Add
1358 attributes used and noinline.
1359 * pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
1360 (pwdgrp (__group32 *&)): Ditto.
1361 * grp.cc (pwdgrp (passwd *&)): Outline constructor.
1362 (pwdgrp (__group32 *&)): Ditto.
1364 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
1366 * thread.h (pthread::equal): New static method.
1367 * thread.cc: Rename pthread_equal to pthread::equal throughout.
1368 (pthread_equal): Use pthread::equal to compare threads ids.
1370 2003-04-15 Christopher Faylor <cgf@redhat.com>
1372 * termios.cc (setspeed): New function.
1373 (cfsetospeed): Use setspeed to set speed.
1374 (cfsetispeed): Use setspeed to set speed.
1376 2003-04-15 Chris January <chris@atomice.net>
1378 * autoload.cc: Add load statement for UuidCreate, and
1379 UuidCreateSequential.
1380 * cpuid.h: New file.
1381 * cygwin.din: Export gethostid.
1382 * fhandler_proc.cc (cpuid): Move to cpuid.h.
1383 (can_set_flag): Move to cpuid.h.
1384 * syscalls.cc (gethostid): New function.
1385 * version.h: Bump api minor version number to 83.
1387 2003-04-15 Thomas Pfaff <tpfaff@gmx.net>
1389 * thread.h (pthread_rwlock::release): New method.
1390 * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
1392 (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
1394 (pthread_rwlock::wrlock_cleanup): Ditto.
1396 2003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
1398 * mkvers.sh: Prefix day with 0 in date only when day < 10.
1400 2003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
1402 * security.cc (get_info_from_sd): New function.
1403 (get_nt_attribute): Only call read_sd and get_info_from_sd.
1405 (get_file_attribute): Move sd error handling to get_info_from_sd.
1406 and symlink handling to fhandler_disk_file::fstat_helper.
1407 (get_nt_object_attribute): Only call read_sd and get_info_from_sd.
1409 (get_object_attribute): Remove symlink handling and simply return -1
1411 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
1412 symlinks set the attribute, call get_file_attribute to get the ids
1413 and return. In the normal case call get_file_attribute with the
1414 addresses of the buffer ids and do not recheck if the file is a socket.
1416 2003-04-10 Christopher Faylor <cgf@redhat.com>
1418 * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
1419 (cygthread::simplestub): Initialize stack pointer.
1420 (cygthread::terminate_thread): Account for possibility that stack
1421 pointer has not been set. Issue warnings for unusual conditions.
1423 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
1425 * regex/regex.h: Define regoff_t as _off_t.
1426 * regex/regex2.h: Ditto.
1428 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
1430 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
1431 * include/cygwin/version.h: Bump API minor number.
1433 2003-04-10 Christopher Faylor <cgf@redhat.com>
1435 * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
1436 * cygthread.cc: Ditto.
1437 (cygthread::stub): Don't initialize already initialized events.
1438 (cygthread::freerange): Don't create thread here.
1439 (cygthread::cygthread): Create thread here. Die if thread not created.
1440 (cygthread::operator new): Simplify. Just grab a thread structure from
1441 the pool. Don't try to start the thread.
1442 (cygthread::terminate_thread): Don't close event handles. Just reuse
1443 them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe uehler).
1445 2003-04-08 Bob Cassels <bcassels@abinitio.com>
1447 * fhandler_console.cc (fhandler_console::read) Handle certain key up
1448 events, to allow pasting accented characters and typing them using the
1449 "alt + numerics" sequences.
1451 2003-04-07 Christopher Faylor <cgf@redhat.com>
1453 * include/limits.h (IOV_MAX): Set to a number which is small enough to
1456 2003-04-04 Christopher Faylor <cgf@redhat.com>
1458 * cygthread.h (cygthread::avail): Make LONG for easier use with
1459 Interlocked* functions.
1460 * cygthread.cc (cygthread::init): Eliminate unneeded muto.
1461 (cygthread::operator new): Don't lock. Instead change use of avail
1462 variable into tri-state: available (1), not available (-1),
1464 (cygthread::terminate_thread): Set avail to uninitialized.
1465 (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
1468 2003-04-04 Christopher Faylor <cgf@redhat.com>
1470 * cygthread.cc (cygthread::operator new): Be more defensive when messing with
1471 threads that are marked "unavailable".
1473 2003-04-03 Christopher Faylor <cgf@redhat.com>
1475 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
1477 2003-04-03 Corinna Vinschen <corinna@vinschen.de>
1479 * external.cc (check_ntsec): Return general ntsec state on NULL
1480 filename. Check wincap.is_security() additionally.
1482 2003-04-02 Christopher Faylor <cgf@redhat.com>
1484 * Makefile.in (EXTRA_OFILES): Remove debugging object.
1486 2003-04-02 Jason Tishler <jason@tishler.net>
1487 Christopher Faylor <cgf@redhat.com>
1489 * external.cc (check_ntsec): New function.
1490 (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
1492 * include/cygwin/version.h: Bump API minor number.
1493 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
1495 2003-04-02 Christopher Faylor <cgf@redhat.com>
1497 * cygthread.cc (cygthread::new): Add more defensive debugging.
1499 2003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
1501 * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
1502 from the current effective ids.
1503 * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
1504 by fhandler_base::fstat.
1505 * security.cc (get_nt_attribute): Do not test wincap.has_security ().
1506 (get_nt_object_attribute): Ditto.
1507 (get_file_attribute): Add test for wincap.has_security ().
1508 (get_object_attribute): Ditto.
1510 2003-04-01 Corinna Vinschen <corinna@vinschen.de>
1512 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
1514 * fhandler.cc: Ditto.
1515 * fhandler.h: Ditto.
1516 * fhandler_clipboard.cc: Ditto.
1517 * fhandler_disk_file.cc: Ditto.
1518 * fhandler_dsp.cc: Ditto.
1519 * fhandler_floppy.cc: Ditto.
1520 * fhandler_mem.cc: Ditto.
1521 * fhandler_proc.cc: Ditto.
1522 * fhandler_process.cc: Ditto.
1523 * fhandler_random.cc: Ditto.
1524 * fhandler_registry.cc: Ditto.
1525 * fhandler_tape.cc: Ditto.
1526 * fhandler_termios.cc: Ditto.
1527 * fhandler_virtual.cc: Ditto.
1528 * fhandler_zero.cc: Ditto.
1531 * syscalls.cc: Ditto.
1533 * include/cygwin/stat.h: Ditto.
1534 * include/cygwin/types.h: Ditto. Remove definition of __off32_t
1537 2003-03-31 Christopher Faylor <cgf@redhat.com>
1539 * exceptions.cc (setup_handler): Make sure winapi lock is released when
1542 2003-03-30 Christopher Faylor <cgf@redhat.com>
1544 * include/cygwin/fs.h: Remove unneeded include.
1545 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
1547 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
1549 * syscalls.cc (login): Fix comment.
1552 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
1554 * syscalls.cc: Slightly cleanup all utmp functions.
1555 (login): Use mutex to secure against concurrent access to wtmp file.
1556 (logout): Rewrite using POSIX calls.
1557 (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
1558 in subsequent functions.
1559 (utmp_readonly): New variable, indicating utmp file open for reading
1561 (internal_setutent): New function implementing setutent().
1562 (setutent): Call internal_setutent now.
1563 (endutent): Reset utmp_readonly.
1564 (getutent): Return immediately if utmp file can't be opened.
1567 (pututline): Ditto. Use mutex to secure against concurrent access to
1570 2003-03-28 Christopher Faylor <cgf@redhat.com>
1572 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
1573 * configure.in: Remove EXE_LDFLAGS.
1574 * configure: Regenerate.
1576 2003-03-28 Christopher Faylor <cgf@redhat.com>
1578 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
1579 * external.cc (cygwin_internal): Define as unsigned long.
1581 2003-03-27 Christopher Faylor <cgf@redhat.com>
1583 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
1586 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1588 * thread.cc: Change 1==foo equations to foo==1 throughout.
1590 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1592 * thread.h: Change class names, methods, members and local vars
1593 according to the GNU coding style.
1595 * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
1596 pthread::init_mainthread.
1597 * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
1598 call to pthread::is_good_object.
1600 2003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
1602 * autoload.cc: Add RegGetKeySecurity().
1603 * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
1606 2003-03-25 Christopher Faylor <cgf@redhat.com>
1607 Joe Buehler <jhpb@draco.hekimian.com>
1609 * fork.cc (fork_parent): Don't copy signals from parent to child here.
1610 * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
1613 2003-03-23 Thomas Pfaff <tpfaff@gmx.net>
1615 * thread.h (class List): Move inline code inside class declaration.
1616 (List::forEach): Change callback parameter to template class member
1618 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
1620 (pthread_keys::fixup_after_fork): Ditto.
1621 (pthread_keys::runAllDestructors): Ditto.
1622 (pthread_key::saveAKey): Remove.
1623 (pthread_key::restoreAKey): Ditto.
1624 (pthread_key::destroyAKey): Ditto.
1625 (pthread_key::run_destructor): Rename to runDestructor.
1626 (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
1627 to fixup mutexes after a fork.
1628 (pthread_mutex::FixupAfterFork): New method.
1629 (pthread_mutex::mutexes): New member.
1630 (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
1631 to fixup conds after a fork.
1632 (pthread_cond::FixupAfterFork): New method.
1633 (pthread_cond::conds): New member.
1634 (pthread_rwlock::fixup_after_fork): Change to inline. Use
1635 List::forEach to fixup rwlocks after a fork.
1636 (pthread_rwlock::FixupAfterFork): New method.
1637 (pthread_rwlock::rwlocks): New member.
1638 (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
1639 fixup mutexes after a fork.
1640 (semaphore::FixupAfterFork): New method.
1641 (semaphore::semaphores): New member.
1642 (MTinterface::mutexs): Remove.
1643 (MTinterface::conds): Ditto.
1644 (MTinterface::rwlocks): Ditto.
1645 (MTinterface::semaphores): Ditto.
1646 (pthread_equal): Add extern "C".
1647 (pthread_mutex_lock): Ditto.
1649 * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
1650 calls for pthread objects.
1651 (semaphore::conds): Instantiate.
1652 (pthread_cond::pthread_cond): Use List::Insert rather than custom list
1654 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
1656 (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
1657 (pthread_rwlock::rwlocks): Instantiate.
1658 (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
1660 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
1662 (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
1663 (pthread_key::saveAKey): Remove.
1664 (pthread_key::fixup_before_fork): Ditto.
1665 (pthread_key::restoreAKey): Ditto.
1666 (pthread_key::fixup_after_fork): Ditto.
1667 (pthread_key::destroyAKey): Ditto.
1668 (pthread_key::runAllDestructors): Ditto.
1669 (pthread_key::run_destructor): Rename to runDestructor.
1670 (pthread_mutex::mutexes): Instantiate.
1671 (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
1673 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
1675 (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
1676 (semaphore::conds): Instantiate.
1677 (semaphore::semaphore): Use List::Insert rather than custom list code.
1678 (semaphores::~semaphore): Use List::Remove rather than custom list
1680 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
1682 2003-03-22 Christopher Faylor <cgf@redhat.com>
1684 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
1687 2003-03-22 Christopher Faylor <cgf@redhat.com>
1689 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
1690 called. Fix typo in debugging output.
1692 2003-03-21 Christopher Faylor <cgf@redhat.com>
1694 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
1695 necessary for newer versions of bash.
1697 2003-03-20 Corinna Vinschen <corinna@vinschen.de>
1699 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
1700 SIGPIPE handling to connection oriented sockets. Add comment.
1702 2003-03-19 Christopher Faylor <cgf@redhat.com>
1704 * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
1705 * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
1706 definition. Don't reset signal handlers after spawm. Just treat like
1708 * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
1709 signal_fixup_after_exec.
1710 * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
1711 Ditto for resetting of arguments.
1713 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1715 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
1718 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1720 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
1721 wrong usage of S_IFDIR.
1722 * security.cc (get_attribute_from_acl): Ditto.
1723 (get_file_attribute): Fix wrong usage of S_IFLNK.
1724 (get_object_attribute): Ditto.
1725 (alloc_sd): Fix wrong usage of S_IFDIR.
1726 * syscalls.cc (chmod): Allow chmod'ing of socket files.
1728 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1730 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
1732 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
1733 instead of numerical constants.
1736 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1738 * pthread.cc (pthread_attr_init): Remove
1739 (pthread_attr_destroy): Ditto.
1740 (pthread_attr_setdetachstate): Ditto.
1741 (pthread_attr_getdetachstate): Ditto.
1742 (pthread_attr_setstacksize): Ditto.
1743 (pthread_attr_getstacksize): Ditto.
1744 (pthread_attr_setinheritsched): Ditto.
1745 (pthread_attr_getinheritsched): Ditto.
1746 (pthread_attr_setschedparam): Ditto.
1747 (pthread_attr_getschedparam): Ditto.
1748 (pthread_attr_setschedpolicy): Ditto.
1749 (pthread_attr_getschedpolicy): Ditto.
1750 (pthread_attr_setscope): Ditto.
1751 (pthread_attr_getscope): Ditto.
1752 (pthread_attr_setstackaddr): Ditto.
1753 (pthread_attr_getstackaddr): Ditto.
1754 (pthread_key_create): Ditto.
1755 (pthread_key_delete): Ditto.
1756 (pthread_setspecific): Ditto.
1757 (pthread_getspecific): Ditto.
1758 (pthread_kill): Ditto.
1759 (pthread_sigmask): Ditto.
1760 (pthread_equal): Ditto.
1761 (pthread_mutex_lock): Ditto.
1762 (pthread_mutex_trylock): Ditto.
1763 (pthread_mutex_unlock): Ditto.
1764 (pthread_mutex_destroy): Ditto.
1765 (pthread_mutex_setprioceiling): Ditto.
1766 (pthread_mutex_getprioceiling): Ditto.
1767 (pthread_mutexattr_destroy): Ditto.
1768 (pthread_mutexattr_getprioceiling): Ditto.
1769 (pthread_mutexattr_getprotocol): Ditto.
1770 (pthread_mutexattr_getpshared): Ditto.
1771 (pthread_mutexattr_gettype): Ditto.
1772 (pthread_mutexattr_init): Ditto.
1773 (pthread_mutexattr_setprioceiling): Ditto.
1774 (pthread_mutexattr_setprotocol): Ditto.
1775 (pthread_mutexattr_setpshared): Ditto.
1776 (pthread_mutexattr_settype): Ditto.
1777 (pthread_cond_destroy): Ditto.
1778 (pthread_cond_signal): Ditto.
1779 (pthread_cond_broadcast): Ditto.
1780 (pthread_condattr_init): Ditto.
1781 (pthread_condattr_destroy): Ditto.
1782 (pthread_condattr_getpshared): Ditto.
1783 (pthread_condattr_setpshared): Ditto.
1784 (pthread_rwlock_destroy): Ditto.
1785 (pthread_rwlock_rdlock): Ditto.
1786 (pthread_rwlock_tryrdlock): Ditto.
1787 (pthread_rwlock_wrlock): Ditto.
1788 (pthread_rwlock_trywrlock): Ditto.
1789 (pthread_rwlock_unlock): Ditto.
1790 (pthread_rwlockattr_init): Ditto.
1791 (pthread_rwlockattr_getpshared): Ditto.
1792 (pthread_rwlockattr_setpshared): Ditto.
1793 (pthread_rwlockattr_destroy): Ditto.
1794 (pthread_getconcurrency): Ditto.
1795 (pthread_setconcurrency): Ditto.
1796 (pthread_getschedparam): Ditto.
1797 (pthread_setschedparam): Ditto.
1799 * thread.h (__pthread_attr_init): Remove prototype.
1800 (__pthread_attr_destroy): Ditto.
1801 (__pthread_attr_setdetachstate): Ditto.
1802 (__pthread_attr_getdetachstate): Ditto.
1803 (__pthread_attr_setstacksize): Ditto.
1804 (__pthread_attr_getstacksize): Ditto.
1805 (__pthread_attr_setinheritsched): Ditto.
1806 (__pthread_attr_getinheritsched): Ditto.
1807 (__pthread_attr_setschedparam): Ditto.
1808 (__pthread_attr_getschedparam): Ditto.
1809 (__pthread_attr_setschedpolicy): Ditto.
1810 (__pthread_attr_getschedpolicy): Ditto.
1811 (__pthread_attr_setscope): Ditto.
1812 (__pthread_attr_getscope): Ditto.
1813 (__pthread_attr_setstackaddr): Ditto.
1814 (__pthread_attr_getstackaddr): Ditto.
1815 (__pthread_key_create): Ditto.
1816 (__pthread_key_delete): Ditto.
1817 (__pthread_setspecific): Ditto.
1818 (__pthread_getspecific): Ditto.
1819 (__pthread_kill): Ditto.
1820 (__pthread_sigmask): Ditto.
1821 (__pthread_equal): Ditto.
1822 (__pthread_mutex_lock): Ditto.
1823 (__pthread_mutex_trylock): Ditto.
1824 (__pthread_mutex_unlock): Ditto.
1825 (__pthread_mutex_destroy): Ditto.
1826 (__pthread_mutex_setprioceiling): Ditto.
1827 (__pthread_mutex_getprioceiling): Ditto.
1828 (__pthread_mutexattr_destroy): Ditto.
1829 (__pthread_mutexattr_getprioceiling): Ditto.
1830 (__pthread_mutexattr_getprotocol): Ditto.
1831 (__pthread_mutexattr_getpshared): Ditto.
1832 (__pthread_mutexattr_gettype): Ditto.
1833 (__pthread_mutexattr_init): Ditto.
1834 (__pthread_mutexattr_setprioceiling): Ditto.
1835 (__pthread_mutexattr_setprotocol): Ditto.
1836 (__pthread_mutexattr_setpshared): Ditto.
1837 (__pthread_mutexattr_settype): Ditto.
1838 (__pthread_cond_destroy): Ditto.
1839 (__pthread_cond_signal): Ditto.
1840 (__pthread_cond_broadcast): Ditto.
1841 (__pthread_condattr_init): Ditto.
1842 (__pthread_condattr_destroy): Ditto.
1843 (__pthread_condattr_getpshared): Ditto.
1844 (__pthread_condattr_setpshared): Ditto.
1845 (__pthread_rwlock_destroy): Ditto.
1846 (__pthread_rwlock_rdlock): Ditto.
1847 (__pthread_rwlock_tryrdlock): Ditto.
1848 (__pthread_rwlock_wrlock): Ditto.
1849 (__pthread_rwlock_trywrlock): Ditto.
1850 (__pthread_rwlock_unlock): Ditto.
1851 (__pthread_rwlockattr_init): Ditto.
1852 (__pthread_rwlockattr_getpshared): Ditto.
1853 (__pthread_rwlockattr_setpshared): Ditto.
1854 (__pthread_rwlockattr_destroy): Ditto.
1855 (__pthread_getconcurrency): Ditto.
1856 (__pthread_setconcurrency): Ditto.
1857 (__pthread_getschedparam): Ditto.
1858 (__pthread_setschedparam): Ditto.
1860 * thread.cc: Rename __pthread_equal to pthread_equal throughout.
1861 Change pthread_self parameter appropriate.
1862 (__pthread_attr_init): Remove __ prefix. Change to extern "C".
1863 (__pthread_attr_destroy): Ditto.
1864 (__pthread_attr_setdetachstate): Ditto.
1865 (__pthread_attr_getdetachstate): Ditto.
1866 (__pthread_attr_setstacksize): Ditto.
1867 (__pthread_attr_getstacksize): Ditto.
1868 (__pthread_attr_setinheritsched): Ditto.
1869 (__pthread_attr_getinheritsched): Ditto.
1870 (__pthread_attr_setschedparam): Ditto.
1871 (__pthread_attr_getschedparam): Ditto.
1872 (__pthread_attr_setschedpolicy): Ditto.
1873 (__pthread_attr_getschedpolicy): Ditto.
1874 (__pthread_attr_setscope): Ditto.
1875 (__pthread_attr_getscope): Ditto.
1876 (__pthread_attr_setstackaddr): Ditto.
1877 (__pthread_attr_getstackaddr): Ditto.
1878 (__pthread_key_create): Ditto.
1879 (__pthread_key_delete): Ditto.
1880 (__pthread_setspecific): Ditto.
1881 (__pthread_getspecific): Ditto.
1882 (__pthread_kill): Ditto.
1883 (__pthread_sigmask): Ditto.
1884 (__pthread_equal): Ditto.
1885 (__pthread_mutex_lock): Ditto.
1886 (__pthread_mutex_trylock): Ditto.
1887 (__pthread_mutex_unlock): Ditto.
1888 (__pthread_mutex_destroy): Ditto.
1889 (__pthread_mutex_setprioceiling): Ditto.
1890 (__pthread_mutex_getprioceiling): Ditto.
1891 (__pthread_mutexattr_destroy): Ditto.
1892 (__pthread_mutexattr_getprioceiling): Ditto.
1893 (__pthread_mutexattr_getprotocol): Ditto.
1894 (__pthread_mutexattr_getpshared): Ditto.
1895 (__pthread_mutexattr_gettype): Ditto.
1896 (__pthread_mutexattr_init): Ditto.
1897 (__pthread_mutexattr_setprioceiling): Ditto.
1898 (__pthread_mutexattr_setprotocol): Ditto.
1899 (__pthread_mutexattr_setpshared): Ditto.
1900 (__pthread_mutexattr_settype): Ditto.
1901 (__pthread_cond_destroy): Ditto.
1902 (__pthread_cond_signal): Ditto.
1903 (__pthread_cond_broadcast): Ditto.
1904 (__pthread_condattr_init): Ditto.
1905 (__pthread_condattr_destroy): Ditto.
1906 (__pthread_condattr_getpshared): Ditto.
1907 (__pthread_condattr_setpshared): Ditto.
1908 (__pthread_rwlock_destroy): Ditto.
1909 (__pthread_rwlock_rdlock): Ditto.
1910 (__pthread_rwlock_tryrdlock): Ditto.
1911 (__pthread_rwlock_wrlock): Ditto.
1912 (__pthread_rwlock_trywrlock): Ditto.
1913 (__pthread_rwlock_unlock): Ditto.
1914 (__pthread_rwlockattr_init): Ditto.
1915 (__pthread_rwlockattr_getpshared): Ditto.
1916 (__pthread_rwlockattr_setpshared): Ditto.
1917 (__pthread_rwlockattr_destroy): Ditto.
1918 (__pthread_getconcurrency): Ditto.
1919 (__pthread_setconcurrency): Ditto.
1920 (__pthread_getschedparam): Ditto.
1921 (__pthread_setschedparam): Ditto.
1923 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1925 * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
1926 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1927 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1928 pthread_rwlock_unlock, pthread_rwlockattr_init,
1929 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1930 and pthread_rwlockattr_destroy.
1931 * include/cygwin/version.h: Bump API minor number.
1932 * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
1934 Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
1935 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1936 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1937 pthread_rwlock_unlock, pthread_rwlockattr_init,
1938 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1939 and pthread_rwlockattr_destroy.
1940 * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
1941 (PTHREAD_RWLOCK_MAGIC): New define.
1942 (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
1943 (pthread_rwlockattr): New class.
1944 (pthread_rwlock): Ditto.
1945 (MTinterface::rwlocks): New member.
1946 (MTinterface::MTinterface): Initialize rwlocks.
1947 Add prototypes for __pthread_rwlock_destroy,
1948 __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
1949 __pthread_rwlock_unlock, __pthread_rwlockattr_init,
1950 __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
1951 and __pthread_rwlockattr_destroy.
1952 * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
1953 (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
1954 (pthread_rwlockattr::isGoodObject): Implement.
1955 (pthread_rwlockattr::pthread_rwlockattr): Ditto.
1956 (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
1957 (pthread_rwlock::initMutex): Ditto.
1958 (pthread_rwlock::pthread_rwlock): Ditto.
1959 (pthread_rwlock::~pthread_rwlock): Ditto.
1960 (pthread_rwlock::RdLock): Ditto.
1961 (pthread_rwlock::TryRdLock): Ditto.
1962 (pthread_rwlock::WrLock): Ditto.
1963 (pthread_rwlock::TryWrLock): Ditto.
1964 (pthread_rwlock::UnLock): Ditto.
1965 (pthread_rwlock::addReader): Ditto.
1966 (pthread_rwlock::removeReader): Ditto.
1967 (pthread_rwlock::lookupReader): Ditto.
1968 (pthread_rwlock::RdLockCleanup): Ditto.
1969 (pthread_rwlock::WrLockCleanup): Ditto.
1970 (pthread_rwlock::fixup_after_fork): Ditto.
1971 (pthread_rwlock::isGoodObject): Ditto.
1972 (pthread_rwlock::isGoodInitializer): Ditto.
1973 (pthread_rwlock::isGoodInitializerOrObject): Ditto.
1974 (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
1975 (__pthread_rwlock_destroy): Ditto.
1976 (pthread_rwlock::init): Ditto.
1977 (__pthread_rwlock_rdlock): Ditto.
1978 (__pthread_rwlock_tryrdlock): Ditto.
1979 (__pthread_rwlock_wrlock): Ditto.
1980 (__pthread_rwlock_trywrlock): Ditto.
1982 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1984 * thread.h (pthread_cond::ExitingWait): Remove.
1985 (pthread_cond::mutex): Ditto.
1986 (pthread_cond::cond_access): Ditto.
1987 (pthread_cond::win32_obj_id): Ditto.
1988 (pthread_cond::TimedWait): Ditto.
1989 (pthread_cond::BroadCast): Ditto.
1990 (pthread_cond::Signal): Ditto.
1991 (pthread_cond::waiting): Change type to unsigned long.
1992 (pthread_cond::pending): New member.
1993 (pthread_cond::semWait): Ditto.
1994 (pthread_cond::mtxIn): Ditto.
1995 (pthread_cond::mtxOut): Ditto.
1996 (pthread_cond::mtxCond): Ditto.
1997 (pthread_cond::UnBlock): New method.
1998 (pthread_cond::Wait): Ditto.
1999 * thread.cc: Update list of cancellation points.
2000 (pthread_cond::pthread_cond): Rewrite.
2001 (pthread_cond::~pthread_cond): Ditto.
2002 (pthread_cond::TimedWait): Remove.
2003 (pthread_cond::BroadCast): Ditto.
2004 (pthread_cond::Signal): Ditto.
2005 (pthread_cond::UnBlock): Implement.
2006 (pthread_cond::Wait): Ditto.
2007 (pthread_cond::fixup_after_fork): Rewrite.
2008 (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
2010 (__pthread_cond_broadcast): Just return 0 if the condition is
2011 not initialized. Call pthread_cond::UnBlock to release blocked
2013 (__pthread_cond_signal): Ditto.
2014 (__pthread_cond__dowait): Rewrite.
2015 (pthread_cond_timedwait): Add pthread_testcancel call. Fix
2016 waitlength calculation.
2017 (pthread_cond_wait): Add pthread_testcancel call.
2019 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
2021 * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
2022 * thread.cc: Remove errno.h include.
2023 (pthread::precreate): Change internal mutex type to normal.
2024 (pthread_mutex::canBeUnlocked): Implement.
2025 (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
2026 (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
2027 Change lock_counter logic. Update SetOwner call.
2028 (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
2029 Change lock_counter logic. Update SetOwner call.
2030 (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
2031 Change lock_counter logic.
2032 (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
2033 (pthread_mutex::SetOwner): Move to thread.h as inline.
2034 (pthread_mutex::LockRecursive): Ditto.
2035 (pthread_mutex::fixup_after_fork): Change lock_counter logic.
2036 (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
2038 * thread.h: Include errno.h and limits.h.
2039 (MUTEX_LOCK_COUNTER_INITIAL): Remove.
2040 (MUTEX_OWNER_ANONYMOUS): New define.
2041 (pthread_mutex::canBeUnlocked): New static method.
2042 (pthread_mutex::lock_counter): Change type to unsigned long.
2043 (pthread_mutex::GetPthreadSelf): New method.
2044 (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
2045 (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
2046 (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
2047 (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
2048 (pthread_mutex::SetOwner): Moved from thread.cc as inline.
2049 (pthread_mutex::LockRecursive): Ditto.
2050 (pthread_mutex::_Lock): New method.
2051 (pthread_mutex::_TryLock): New method.
2052 (pthread_mutex::_UnLock): New method.
2053 (pthread_mutex::_Destroy): New method.
2055 2003-03-18 Christopher January <chris@atomice.net>
2057 * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
2058 only on Windows NT. Read CPU Mhz value only on NT. Revert previous
2059 change so cpuid instruction is called even on non-NT systems.
2061 2003-03-17 Corinna Vinschen <corinna@vinschen.de>
2063 * glob.c (g_lstat): Change API minor test to match API minor number
2064 change in previous patch.
2067 2003-03-17 Christopher Faylor <cgf@redhat.com>
2069 * include/cygwin/version.h: Reorganize last two api versions so that
2070 btowc and trunc exports show up before previous bump since there has
2071 been no exported version of the DLL with the 64 bit changes yet but
2072 1.3.22 will have the btowc and trunc.
2074 2003-03-17 Christopher Faylor <cgf@redhat.com>
2076 * cygwin.din: Export btowc, trunc.
2077 * include/cygwin/version.h: Reflect new exports.
2078 * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
2079 * syscalls.cc (_fstat): Ditto.
2081 2003-03-16 Christopher Faylor <cgf@redhat.com>
2083 * fhandler_console.cc (fhandler_console::close): Correct check for
2084 current tty. Add debugging output when console is freed.
2085 (set_console_state_for_spawn): Add debugging output.
2086 * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
2087 open flag when vforking.
2088 * sigproc.cc (sigproc_terminate): Fix debugging output.
2089 * spawn.cc (handle): Eliminate second argument.
2090 (spawn_guts): Reflect elimination of argument change to handle.
2091 * syscalls.cc (setsid): Add debugging output when console is freed.
2093 2003-03-14 Christopher Faylor <cgf@redhat.com>
2095 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
2098 2003-03-13 Christopher Faylor <cgf@redhat.com>
2100 * include/cygwin/version.h: Bump DLL minor number to 23.
2102 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
2104 * autoload.cc (IsProcessorFeaturePresent): Add.
2105 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
2107 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
2109 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
2111 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
2113 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
2114 (cygwin_rexec): Ditto.
2116 2003-03-13 Christopher Faylor <cgf@redhat.com>
2118 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
2121 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
2123 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
2125 * fhandler_socket.cc (fhandler_socket::dup): Don't call
2126 fhandler_base::dup() but call DuplicateHandle directly instead to have
2127 control over socket inheritence.
2129 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
2131 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
2132 using WinSock2 socket duplication methods. Add comment.
2134 2003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
2136 * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
2137 Set io_handle to INVALID_SOCKET in case of failure.
2138 (fhandler_socket::dup): Return 0 if the io_handle is valid.
2140 2003-03-10 Corinna Vinschen <corinna@vinschen.de>
2142 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
2143 * security.cc (alloc_sd): Ditto.
2145 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2147 * winver.rc: Change Copyright hint to include 2003.
2149 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2151 Switch to 32/64 datatypes:
2152 * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
2153 aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
2154 facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
2155 ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
2156 getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
2157 seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
2159 (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
2160 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
2161 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
2162 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
2163 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
2164 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
2165 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
2166 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
2168 * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
2169 members to __uid32_t and __gid32_t.
2170 * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
2171 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
2172 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
2173 _fstat64 ftello64 _lseek64 mknod32 _open64.
2174 * glob.c: Include perprocess.h.
2175 (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
2177 (g_lstat): Check for applications API version to call the appropriate
2178 typed gl_lstat function.
2179 (g_stat): Ditto for gl_stat.
2180 * shm.cc (client_request_shm::client_request_shm): Call geteuid32
2181 and getegid32 instead of geteuid and getegid throughout.
2182 * syscalls.cc (_open64): New alias for open.
2183 (_lseek64): New alias for lseek64.
2184 (_fstat64): New alias for fseek64.
2185 (mknod32): New function.
2186 (mknod): Calls mknod32 now.
2187 * winsup.h: Make function declarations for getuid32, geteuid32,
2188 and getpwuid32 accessible for plain C sources. Add declarations
2189 for getegid32 and getpwnam.
2190 * include/cygwin/version.h: Bum API minor number to 78.
2191 * include/sys/cygwin.h: Guard C++ specific members of struct
2192 per_process against inclusion in plain C sources.
2193 * include/sys/mman.h (mman): Add guard to avoid type clash when
2196 2003-03-09 Christopher Faylor <cgf@redhat.com>
2198 * include/cygwin/version.h: Bump DLL minor number to 22.
2200 2003-03-09 Christopher Faylor <cgf@redhat.com>
2202 Do some minor reformatting of 'extern "C"' use throughout.
2204 2003-03-06 Christopher January <chris@atomice.net>
2206 * autoload.cc (GetSystemTimes): Define new autoload function.
2207 * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
2208 (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
2210 (format_proc_uptime): Use GetSystemTimes if available.
2211 (read_value): New macro.
2213 (cpuid): New function.
2214 (can_set_flag): New function.
2215 (format_proc_cpuinfo): New function.
2216 (format_proc_partitions): New function.
2218 2003-03-09 Christopher Faylor <cgf@redhat.com>
2220 * syscalls.cc (unlink): Attempt to be more clever about setting
2221 attributes of file. Only open file in query mode to avoid having to
2222 mess with security stuff for reading.
2224 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2226 * rmsym: Fix regular expression.
2228 2003-03-09 Christopher Faylor <cgf@redhat.com>
2230 * Makefile.in: Change from using new-* to cygwin0 for temporary
2233 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2235 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
2237 2003-03-08 Christopher Faylor <cgf@redhat.com>
2239 * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
2240 to delete files since this allows us to preserve the protection of hard
2242 (link): Generate full path for potentially recalculated .lnk target.
2244 2003-03-08 Christopher Faylor <cgf@redhat.com>
2246 Revert below changes regarding _pinfo::cmdline.
2248 2003-03-08 Corinna Vinschen <corinna@vinschen.de>
2250 * external.cc (cygwin_internal): Change n to __off64_t to match change
2252 * fhandler.h (class fhandler_virtual): Change filesize member to
2254 * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
2255 (format_proc_stat): Ditto.
2256 (format_proc_uptime): Ditto.
2257 * fhandler_process.cc (format_process_stat): Ditto.
2258 (format_process_status): Ditto.
2259 (format_process_statm): Ditto.
2260 * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
2261 * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
2263 2003-03-07 Christopher Faylor <cgf@redhat.com>
2265 * path.h (PATH_LNK): New enum val.
2266 (path_conv::is_lnk_symlink): New function. True if path represents
2268 * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
2269 (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
2270 * syscalls.cc (unlink): Always remove readonly attribute from a symlink
2272 (link): (from Corinna Vinschen) Allow links to symlinks. Reset
2273 attributes on a symlink after successful link creation.
2274 (chmod): Use is_lnk_symlink where appropriate.
2277 2003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
2279 * tty.cc (create_tty_master): Call GetComputerName instead of
2280 cygwin_gethostname. Set ut_id.
2281 * syscalls.cc (login): Call endutent.
2282 (setutent): Do not seek after a fresh open.
2284 2003-03-07 Corinna Vinschen <corinna@vinschen.de>
2286 * syscalls.cc (seteuid32): Fix formatting.
2288 2003-03-04 Thomas Pfaff <tpfaff@gmx.net>
2290 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
2291 prior to pthread objects.
2293 2003-03-04 Jason Tishler <jason@tishler.net>
2295 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
2297 2003-03-03 Christopher Faylor <cgf@redhat.com>
2299 * fhandler.h (fhandler_tty_slave::close): Declare new function.
2300 (fhandler_tty_slave::dup): Declare new function.
2301 (fhandler_tty_slave::fixup_after_function): Declare new function.
2302 * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
2303 fhandler_console::open_fhs when associated with a pty.
2304 (fhandler_tty_slave::close): Define new function. Decrement
2305 fhandler_console::open_fhs when associated with a pty.
2306 (fhandler_tty_slave::dup): Define new function. Increment
2307 fhandler_console::open_fhs when associated with a pty.
2308 (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
2309 fhandler_console::open_fhs when associated with a pty.
2311 2003-03-03 Christopher Faylor <cgf@redhat.com>
2313 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
2314 fhandler_console::open_fhs here.
2315 (fhandler_pty_slave::close): Ditto for close.
2317 2003-03-02 Christopher Faylor <cgf@redhat.com>
2319 * lib/getopt.c: Refresh from NetBSD sources.
2321 2003-03-02 Christopher Faylor <cgf@redhat.com>
2323 * fhandler_console.cc (fhandler_console::close): Don't decrement
2324 in use counter if in vfork fixup stage.
2326 2003-03-02 Christopher Faylor <cgf@redhat.com>
2328 * lib/getopt.c: Nuke use of unneeded BSDisms.
2330 2003-03-02 Christopher Faylor <cgf@redhat.com>
2332 * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
2333 if LoadLibraryEx fails.
2334 * dtable.cc (dtable::dec_console_fds): Eliminate.
2335 (dtable::release): Don't treat console specially.
2336 (dtable::build_fhandler): Ditto.
2337 * dtable.h (console_fds): Eliminate.
2338 (dtable::dec_console_fds): Eliminate.
2339 (dtable::inc_console_fds): Eliminate.
2340 * fhandler.h (fhandler_console::open_fhs): New static element.
2341 * fhandler_console.cc (fhandler_console::open): Increment open_fs.
2342 (fhandler_console::close): Call FreeConsole if no more open consoles
2343 and ctty is not associated with the console.
2344 * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
2345 (check_pty_fds): Eliminate definition.
2346 * winsup.h (check_pty_fds): Eliminate declaration.
2348 2003-03-02 Christopher Faylor <cgf@redhat.com>
2350 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
2351 LoadLibrary was ignored.
2353 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
2355 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
2356 file using Win32 calls.
2358 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
2360 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
2363 2003-02-28 Christopher Faylor <cgf@redhat.com>
2365 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
2366 * dcrt0.cc (cygwin_atexit): New function.
2367 (cygwin_exit): Ditto.
2369 2003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
2371 * syscalls.cc (fstat64): Pass get_name () to pc.
2372 (access): Pass fn to stat_worker.
2374 2003-03-27 Corinna Vinschen <corinna@vinschen.de>
2376 * fhandler_socket.cc (class sock_event): New class managing Winsock
2377 events for interruptible socket calls.
2378 (fhandler_socket::connect): Move support for interruptible call to
2379 class sock_event. Use class object instead.
2380 (fhandler_socket::accept): Ditto. Remove useless casts.
2382 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
2384 * fhandler_socket.cc (fhandler_socket::connect): Add support for
2385 an interruptable connect.
2387 2003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
2389 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
2390 if the call to set the primary group succeeds.
2392 2003-02-27 Christopher Faylor <cgf@redhat.com>
2394 * cygthread::detach: Improve error message.
2396 2003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
2398 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
2400 2003-02-25 Corinna Vinschen <corinna@vinschen.de>
2402 * mmap.cc (mmap64): Fix returned address by taking the granularity
2405 2003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
2407 * syslog.cc (syslog): Do not unlock the file before closing it
2408 and remove debug_printf about stream errors.
2410 2003-02-22 Christopher Faylor <cgf@redhat.com>
2412 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
2413 # cygwin.din: Export mallinfo.
2414 # malloc_wrapper.cc (mallinfo): New function.
2416 2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
2418 * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
2419 pid as an unsigned decimal. On Win95 print a timestamp and attempt to
2420 lock the file up to four times in 3 ms.
2422 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
2424 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
2426 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
2427 uid/gid of current process in case of open sockets.
2429 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
2431 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
2432 data on sockets to evaluate AF_LOCAL sockets correctly.
2433 (dtable::build_fhandler): Set unit number on sockets.
2434 * fhandler.h (fhandler_socket): Add unit number.
2435 (fhandler_socket::get_unit): New method.
2436 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
2438 (fhandler_socket::fstat): Reorganize to return more Linux-like
2440 * net.cc: include ctype.h.
2441 (fdsock): Set unit number when building fhandler.
2442 * path.cc (path_conv::check): Set device type to FH_SOCKET if file
2443 is a AF_UNIX socket.
2444 (get_devn): Evaluate unit for virtual socket devices.
2445 (win32_device_name): Set windows path for sockets to unix_path with
2446 just backslashes to keep the different names.
2447 * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
2449 (stat_worker): Ditto.
2451 2003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
2453 * autoload.cc (AccessCheck): Add.
2454 (DuplicateToken): Add.
2455 * security.h (check_file_access): Declare.
2456 * syscalls.cc (access): Convert path to Windows, check existence
2457 and readonly attribute. Call check_file_access instead of acl_access.
2458 * security.cc (check_file_access): Create.
2459 * sec_acl (acl_access): Delete.
2461 2003-02-19 Christopher Faylor <cgf@redhat.com>
2463 * fhandler.cc (fhandler_base::open): Move some filesystem specific
2465 (fhandler_disk_file::open): Accept some filesystem specific stuff.
2466 * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
2467 (sig_send): Don't assume that signal thread is ready.
2469 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
2471 * wincap.h (wincap): Remove unnecessary definition of
2472 supports_sparse_files.
2475 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
2477 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
2478 created by cygheap_fdnew constructor.
2479 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
2480 * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
2481 creation of file descriptor behind blocking OS call.
2482 * net.cc (cygwin_socket): Ditto.
2483 (cygwin_rcmd): Ditto.
2484 (cygwin_rresvport): Ditto.
2485 (cygwin_rexec): Ditto.
2486 (socketpair): Ditto.
2488 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
2490 * autoload.cc (GetCompressedFileSize): Add.
2491 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
2492 st_blocks value from GetCompressedFileSize() if available.
2494 2003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2496 * wincap.h (wincaps::supports_sparse_files): New flag.
2497 (wincapc::supports_sparse_files): New method.
2498 * wincap.cc (wincap_unknown): Define value for the new flag.
2500 (wincap_95osr2): Ditto.
2502 (wincap_98se): Ditto.
2504 (wincap_nt3): Ditto.
2505 (wincap_nt4): Ditto.
2506 (wincap_nt4sp4): Ditto.
2507 (wincap_2000): Ditto.
2509 * path.h (path_conv::fs_flags): New method.
2510 * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
2511 (fhandler_disk_file::open): Set newly created and truncated files as
2512 sparse on platforms that support it.
2514 2003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
2516 * grp.cc (internal_getgroups): Handle properly tokens with
2517 no groups. Fix bug introduced on 2003-02-04.
2519 2003-02-16 Christopher Faylor <cgf@redhat.com>
2521 * cygwin.din: Export all appropriate newlib libm functions. Sort.
2522 * include/cygwin/version.h: Bump API minor number.
2524 2003-02-15 Christopher Faylor <cgf@redhat.com>
2526 * cygwin.din: Export all appropriate newlib libc functions.
2527 * include/cygwin/version.h: Bump API minor number.
2529 2003-02-14 Jason Tishler <jason@tishler.net>
2531 * mmap.cc (mprotect): Add missing break.
2533 2003-02-13 Christopher Faylor <cgf@redhat.com>
2535 * exceptions.cc (try_to_debug): Don't reset priority when returning
2536 from non-waitloop call.
2538 2003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2539 Christopher Faylor <cgf@redhat.com>
2541 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
2543 * autoload.cc (MessageBeep): Add.
2545 2003-02-13 Christopher Faylor <cgf@redhat.com>
2547 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
2549 2003-02-13 Christopher Faylor <cgf@redhat.com>
2551 * environ.cc (environ_init): Use strechr.
2553 2003-02-13 Christopher Faylor <cgf@redhat.com>
2555 * include/cygwin/in.h (sockaddr_in): Fix typo.
2557 2003-02-12 Christopher Faylor <cgf@redhat.com>
2559 * path.h (path_conv): Reorganize slightly.
2561 2003-02-12 Christopher Faylor <cgf@redhat.com>
2563 * fhandler_tty.cc (process_input): Add sanity check to ensure that
2564 console typeahead is cleared on signal.
2566 2003-02-12 Christopher Faylor <cgf@redhat.com>
2568 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
2571 2003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
2573 * include/cygwin/in.h (in_attr_t): Define new type.
2574 * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
2575 (inet_lnaof): Ditto.
2576 (inet_netof): Ditto.
2577 (inet_network): Ditto.
2579 2003-02-10 Christopher Faylor <cgf@redhat.com>
2581 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
2583 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
2584 * security.cc (get_attribute_from_acl): Accept mode_t attribute.
2585 (get_nt_attribute): Ditto.
2586 (get_file_attribute): Ditto.
2587 (get_nt_object_attribute): Ditto.
2588 (get_object_attribute): Ditto.
2589 * security.h: Reflect above changes.
2590 * syscalls.cc (chown_worker): Change attrib to mode_t.
2592 2003-02-08 Christopher Faylor <cgf@redhat.com>
2594 * include/cygwin/version.h: Bump DLL minor number to 21.
2596 2003-02-07 Christopher Faylor <cgf@redhat.com>
2598 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
2601 2003-02-07 Corinna Vinschen <corinna@vinschen.de>
2603 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
2604 parameter. Only protect pages actually unused currently. Do job
2605 of map_map() when initializing a map.
2606 (mmap_record::map_map): Reduce functionality for the reuse case
2607 of private anonymous mapping.
2608 (mmap_record::fixup_map): Format change.
2609 (list::add_record): Add offset and length parameter to call
2610 mmap_record::alloc_map() correctly.
2611 (mmap64): Rename `l' variable to `map_list'. Accommodate above changes.
2612 (munmap): Rename `l' variable to `map_list'.
2614 (fhandler_disk_file::mmap): Streamline code.
2616 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
2618 2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2619 Christopher Faylor <cgf@redhat.com>
2621 * exceptions.cc (try_to_debug): Set priority of current thread rather
2622 than the main thread. Make busy waiting loop less busy. Restore
2623 priority when function returns.
2625 2003-02-07 Christopher Faylor <cgf@redhat.com>
2627 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
2629 2003-02-07 Christopher Faylor <cgf@redhat.com>
2631 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
2633 2003-02-06 Christopher Faylor <cgf@redhat.com>
2635 * heap.cc (heap_init): Remove debugging code.
2637 2003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
2639 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
2640 declaration of is_grp_member.
2641 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
2642 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
2643 * grp.cc (pwdgrp::read_group): Change group name to provide better
2645 (getgrgid): Use gid16togid32.
2646 * sec_helper.cc (is_grp_member): Delete.
2648 2003-02-05 Christopher Faylor <cgf@redhat.com>
2650 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
2651 (conv_path_list_buf_size): Accommodate relative paths.
2653 2003-02-05 Christopher Faylor <cgf@redhat.com>
2655 * path.cc (etc::dir_changed): Fix debug printf.
2657 2003-02-05 Corinna Vinschen <corinna@vinschen.de>
2659 * sec_acl.cc (setacl): Move all permission settings to beginning of
2660 loop. Set default rights to same values as in alloc_sd(). Set DELETE
2661 for owner and default owner only if S_IWOTH is given.
2663 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2665 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
2666 wrapper function definitions. Replace call to the aclXYZ functions by
2668 (searchace): Change type of third argument to __uid32_t and use
2669 ILLEGAL_UID instead of -1;
2670 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
2671 for S_IWOTH. Replace -1 by ILLEGAL_UID.
2672 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
2673 In last else clause, suppress second call to ace_sid.get_id and use
2674 TRUE in first call. Replace EqualSid by ==.
2675 (acl_access): Call internal_getgroups in USER and GROUP cases.
2676 (acecmp: Define static.
2677 (acl32): Create from 16 bit type.
2680 (aclcheck32): Ditto.
2682 (acltomode32): Ditto.
2683 (aclfrommode32): Ditto.
2684 (acltopbits32): Ditto.
2685 (aclfrompbits32): Ditto.
2686 (acltotext32): Ditto.
2687 (aclfromtext32): Ditto, and use strechr.
2688 (acl16to32): Create.
2689 (acl): Make it a wrapper function.
2695 (aclfrommode): Ditto.
2696 (acltopbits): Ditto.
2697 (aclfrompbits): Ditto.
2699 (aclfromtext): Ditto.
2700 * security.cc (write_sd): Call set_process_privilege and check
2702 (alloc_sd): Remove call to set_process_privilege and the owner check.
2704 2003-02-05 Christopher Faylor <cgf@redhat.com>
2706 * include/sys/cygwin.h: Use C-style comments.
2708 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2710 * sec_helper.cc (get_sids_info): New function.
2711 * security.cc (extract_nt_dom_user): Simplify with strechr.
2712 (get_user_groups): Initialize glen to MAX_SID_LEN.
2713 (get_user_local_groups): Ditto.
2714 (get_attribute_from_acl): Define ace_sid as cygpsid.
2715 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
2716 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
2717 (get_nt_object_attribute): Ditto.
2718 (alloc_sd): Define ace_sid as cygpsid.
2720 2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
2722 * syscalls.cc (struct system_cleanup_args): New struct.
2723 (system_cleanup): New function.
2724 (system): Use pthread_cleanup_push and _pop to save and restore
2725 signal handlers and sigprocmask.
2727 2003-02-04 Corinna Vinschen <corinna@vinschen.de>
2729 * path.cc (symlink): Create security attributes so that only the
2730 user can modify the symlink.
2731 * security.cc (set_security_attribute): Remove symlink special
2734 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2736 * grp.cc (internal_getgroups): Do not return without closing
2739 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2741 * security.h (class cygpsid): New class.
2742 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
2743 get_uid, get_gid, string, debug_printf and the == and != operators.
2744 (cygsidlist::clear_supp): Only do work if setgroups has been called.
2745 * sec_helper.cc: Define sid_auth NO_COPY.
2746 (cygpsid::operator==): New operator.
2747 (cygpsid::get_id): New function.
2748 (cygpsid::string): New function.
2749 (cygsid::string): Delete.
2750 (cygsid::get_id): Delete.
2751 * pwdgrp.h: Change arguments of internal_getpwsid,
2752 internal_getgrsid and internal_getgroups to cygpsid.
2753 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
2754 * grp.cc (internal_getgrsid): Ditto.
2755 (internal_getgroups): Ditto.
2757 2003-02-03 Christopher Faylor <cgf@redhat.com>
2759 Eliminate most unneeded this-> pointers throughout.
2761 2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
2763 * security.h: Add third argument to set_process_privilege.
2764 * autoload.cc: Add OpenThreadToken.
2765 * sec_helper.cc (set_process_privilege): Add and use use_thread
2767 * security.cc (alloc_sd): Modify call to set_process_privilege.
2768 Remember the result in each process. If failed and file owner is not
2771 2003-02-03 Corinna Vinschen <corinna@vinschen.de>
2773 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
2774 length and don't set errno in case of WSAEMSGSIZE error.
2775 (fhandler_socket::recvmsg): Ditto.
2777 2003-02-01 Christopher Faylor <cgf@redhat.com>
2779 * grp.cc (getgrent32): Only refresh group entries when at beginning.
2780 (internal_getgrsid): Only refresh if uninitialized.
2781 (internal_getgrent): Ditto.
2782 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
2783 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
2784 (internal_getpwsid): Only refresh if uninitialized.
2785 (getpass): No need to refresh passwd data here.
2786 * pwdgrp.h (refresh): Eliminate default.
2788 2003-01-31 Christopher Faylor <cgf@redhat.com>
2790 * dlfcn.cc (dlerror): Only report load errors once per error.
2792 2003-01-31 Christopher Faylor <cgf@redhat.com>
2794 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
2797 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
2799 2003-01-31 Troy Curtiss <troyc@usa.net>
2801 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
2802 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
2803 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
2804 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
2805 since 0 is not a valid Win32 setting.
2806 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
2807 B0, otherwise get it from the DCB.
2809 2003-01-31 Christopher Faylor <cgf@redhat.com>
2811 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
2813 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
2814 have lock since that means we are in the process of reading the file.
2816 2003-01-31 Jason Tishler <jason@tishler.net>
2818 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
2821 2003-01-30 Christopher Faylor <cgf@redhat.com>
2823 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
2824 error when inspecting path.
2826 2003-01-29 Christopher Faylor <cgf@redhat.com>
2828 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
2831 2003-01-28 Corinna Vinschen <corinna@vinschen.de>
2833 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
2834 set connection state of returned socket to CONNECTED.
2836 2003-01-27 Christopher Faylor <cgf@redhat.com>
2838 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
2841 2003-01-26 Christopher Faylor <cgf@redhat.com>
2843 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
2844 longer a valid return from next_str.
2845 (pwdgrp::add_line): Duh. Revert to use strchr.
2847 2003-01-26 Christopher Faylor <cgf@redhat.com>
2849 * string.h (strechr): New function.
2850 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
2851 Return EOS on failure. Don't check for NULL since it shouldn't be
2853 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
2854 (pwdgrp::next_num): Pass explicit separator character to next_str.
2855 * grp.cc (pwdgrp::parse_group): Ditto.
2856 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
2858 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
2860 2003-01-26 Christopher Faylor <cgf@redhat.com>
2862 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
2865 2003-01-26 Christopher Faylor <cgf@redhat.com>
2867 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
2868 structure should always be completely filled out.
2869 * grp.cc (pwdgrp::parse_group): Ditto.
2871 2003-01-26 Christopher Faylor <cgf@redhat.com>
2873 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
2876 2003-01-26 Christopher Faylor <cgf@redhat.com>
2878 * include/sys/strace.h (paranoid_printf): Define as not being part of
2881 2003-01-25 Christopher Faylor <cgf@redhat.com>
2883 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
2884 true/false if parse operation succeeded.
2885 (pwdgrp::reparse): Remove.
2886 (pwdgrp::raw_ptr): New function. Returns pointer in line.
2887 (pwdgrp::next_num): New functions for parsing other than unsigned long.
2888 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
2889 Don't fill in fields with NULL and assign empty gr_mem to known pointer
2890 rather than doing a pointless calloc. Streamline gr_mem parsing.
2891 Don't increment curr_lines here.
2892 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
2893 Don't increment curr_lines here.
2894 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
2895 (pwdgrp::reparse): Remove.
2896 (pwdgrp::next_num): Rename from next_int. Return bool indicating
2897 success of parse, argument returns value parsed.
2898 (pwdgrp::add_line): Increment curr_lines here on successful parse.
2899 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
2902 2003-01-25 Christopher Faylor <cgf@redhat.com>
2904 * pwdgrp.cc (pwdgrp::reparse): Declare.
2905 * uinfo.cc (pwdgrp::reparse): Define.
2906 * grp.cc (pwdgrp::parse_group): Use reparse.
2908 2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
2910 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
2911 update the euid and call cygheap->user.set_name. Remove special
2912 handling of ILLEGAL_UID.
2913 (setgid32): Add a debug_printf. On Win95, always set the egid.
2914 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
2915 * child_info.h (class cygheap_exec_info): Remove uid.
2916 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
2917 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
2918 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
2919 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
2921 2003-01-24 Christopher Faylor <cgf@redhat.com>
2923 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
2924 scroll region if size changes.
2926 2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
2927 Jason Tishler <jason@tishler.net>
2929 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
2930 * syscalls.cc (setreuid32): New function.
2932 (setregid32): Ditto.
2934 * include/cygwin/version.h: Bump API minor number.
2936 2003-01-23 Christopher Faylor <cgf@redhat.com>
2938 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2940 2003-01-23 Christopher Faylor <cgf@redhat.com>
2942 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
2943 instead. Use next_str and next_int to parse arguments.
2944 * passwd.cc (pwdgrp::parse_passwd): Ditto.
2945 (grab_string): Eliminate.
2947 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
2948 (pwdgrp::parse_passwd): Reflect above change.
2949 (pwdgrp::parse_group): Reflect above change.
2950 (pwdgrp::next_str): New function.
2951 (pwdgrp::next_int): Ditto.
2952 (pwdgrp::gets): Eliminate.
2953 * uinfo.cc (pwdgrp::next_str): New function.
2954 (pwdgrp::next_int): Ditto.
2955 (pwdgrp::add_line): Subsume gets.
2956 (pwdgrp::gets): Eliminate.
2957 (pwdgrp::load): Just call add_line to parse input buffer.
2959 2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
2961 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
2962 2003-01-09 mutex patch.
2963 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
2965 2003-01-22 Corinna Vinschen <corinna@vinschen.de>
2967 * cygrun.c: Move from here to ../testsuite.
2968 * Makefile.in: Remove cygrun.exe dependencies.
2970 2003-01-21 Jason Tishler <jason@tishler.net>
2972 * cygwin.din: Export nanosleep().
2973 * signal.cc (nanosleep): New function.
2974 (sleep): Move old functionality to nanosleep(). Call nanosleep().
2975 (usleep): Remove old functionality. Call nanosleep().
2976 * include/cygwin/version.h: Bump API minor number.
2978 2003-01-21 Christopher Faylor <cgf@redhat.com>
2980 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
2982 (gr): Use constructor (sigh).
2983 (pwdgrp::parse_group): Rename from parse_grp.
2984 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
2985 with a single argument.
2986 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
2988 (pr): Use constructor (sigh).
2989 (pwdgrp::parse_passwd): Rename from "parse_pwd".
2990 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
2991 with a single argument.
2992 * pwdgrp.h (pwdgrp_state): Eliminate.
2993 (pwdgrp): Reflect above renamings.
2994 (pwdgrp::etc_ix): Rename from pwd_ix.
2995 (pwdgrp::read): New element.
2996 (pwdgrp::lock): New element.
2997 (pwdgrp::refresh): New function.
2998 (pwdgrp::load): Eliminate variations which take buffer arguments.
2999 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
3000 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
3001 (pwdgrp::load): Set initialized state to true rather than setting state
3004 2003-01-21 Christopher Faylor <cgf@redhat.com>
3006 * include/cygwin/version.h: Bump DLL minor number.
3008 2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
3010 * path.h (etc::change_possible): Revert the type to bool.
3011 (etc::set_last_modified): Remove obsolete function.
3012 * path.cc (etc::change_possible): Revert type to bool.
3013 (etc::test_file_change): Do not test for negative values of
3014 change_possible and do not set it to -res.
3015 (etc::dir_changed): When the handle is NULL, call memset instead of
3016 test_file_changed. When the handle is invalid, return true. Detect
3017 filename change in /etc.
3018 (etc::file_changed): Remove unneeded check for !fn[n].
3019 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
3020 * pwdgrp.h (pwdgrp::operator =): Eliminate.
3022 2003-01-19 Christopher Faylor <cgf@redhat.com>
3024 * pwdgrp.h (etc): Move to path.h.
3025 (pwdgrp::max_lines): New field.
3026 (pwdgrp::curr_lines): New field.
3027 (pwdgrp::pwdgrp_buf): Ditto.
3028 (pwdgrp_buf_elem_size): Ditto.
3029 (pwdgrp_parse): Ditto.
3030 (pwdgrp::gets): Just declare here.
3031 (pwdgrp::load): Ditto. Just take one argument.
3032 (pwdgrp::load): Define overloaded function accepting passwd buf.
3033 (pwdgrp::load): Define overloaded function accepting group buf.
3034 * grp.cc: Use pwdgrp elements rather than standalone static variables
3036 (curr_lines): Eliminate.
3038 (add_grp_line): Ditto.
3039 (parse_grp): Define as returning boolean. Accept void * arg and line
3040 count. Coerce first argument into __group32 buf reference. Increment
3041 curr_line as appropriate.
3042 (read_etc_group): Pass pwdgrp buffer to gr.load.
3043 * passwd.cc: Use pwdgrp elements rather than standalone static variables
3045 (curr_lines): Eliminate.
3047 (add_grp_line): Ditto.
3048 (parse_passwd): Define as returning boolean. Accept void * arg and line
3049 count. Coerce first argument into passwd buf reference. Increment
3050 curr_line as appropriate.
3051 (read_etc_group): Pass pwdgrp buffer to pr.load.
3052 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
3054 (etc::last_modified): Ditto.
3055 (etc::change_possible): Ditto. Renamed from sawchange. Change to
3056 signed char since elements are now tri-state.
3057 (etc::init): Assume "handle" is 1 based rather than 0.
3058 (etc::test_file_change): New function. Sets change_possible based on
3059 file date comparison.
3060 (etc::dir_changed): Check file states immediately after changed_h is
3061 initialized to avoid a race.
3062 (etc::file_changed): Use test_file_change to detect if file needs to be
3064 * path.h (etc): Move class here from pwdgrp.h.
3065 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
3067 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
3068 (pwdgrp::add_line): New function.
3069 (pwdgrp::load): Call generic add_line function which will call correct
3072 2003-01-17 Christopher Faylor <cgf@redhat.com>
3074 * cygheap.cc: Change most 'int's to 'unsigned's.
3075 (_cmalloc): Only check for size of malloced region when calculating
3076 bucket. Add overhead when performing the sbrk. Previous change broke
3079 2003-01-17 Christopher Faylor <cgf@redhat.com>
3081 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
3082 * grp.cc: Change most statics to NO_COPY throughout.
3085 2003-01-17 Christopher Faylor <cgf@redhat.com>
3087 * pwdgrp.h: Change some BOOLs to bools.
3088 (pwdgrp::pwdgrp): Remove unneeded constructor.
3089 * passwd.cc: Change BOOL to bool throughout.
3091 2003-01-17 Corinna Vinschen <corinna@vinschen.de>
3093 * cygwin.din: Add strerror_r.
3094 * include/cygwin/version.h: Bump API minor number.
3096 2003-01-17 Christopher Faylor <cgf@redhat.com>
3098 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
3099 /etc, unless debugging.
3101 2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
3103 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
3104 "unknown" to "mkgroup".
3105 (internal_getgrgid): Do not return default in nontsec case.
3106 (internal_getgroups): Add argument srchsid and look for it in groups if
3108 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
3109 same default uid for Win95 and NT. Call cygheap_user::ontherange to
3112 2003-01-16 Christopher Faylor <cgf@redhat.com>
3114 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
3115 * cygheap.h (init_cygheap::etc_changed_h): Remove.
3116 (init_cygheap::etc_changed): Ditto.
3117 * grp.cc (group_state): Remove. Use gr instead throughout.
3118 (gr): Define as class pwdgrp.
3119 (read_etc_group): Remove gr definition. Remove calls to
3120 set_last_modified and close. Pass add_grp to gr.load to load file.
3121 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
3122 (pr): Define as class pwdgrp.
3123 (read_etc_passwd): Remove pr definition. Remove calls to
3124 set_last_modified and close. Pass add_pwd_line to pr.load to load
3126 * pwdgrp.h (etc): New helper class for pwdgrp.
3127 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
3128 file_w32 and last_modified fields.
3129 (pwdgrp::set_last_modified): Remove.
3130 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
3132 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
3133 scanning. Close file handle after reading buffer into memory. Parse
3134 buffer by calling second argument.
3135 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
3136 beginning of buffer.
3137 (pwdgrp::close): Remove.
3138 * uinfo.cc (etc::dir_changed): New function.
3140 (etc::file_changed): Ditto.
3141 (etc::set_last_modified): Ditto.
3143 2003-01-16 Jason Tishler <jason@tishler.net>
3145 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
3146 ReadProcessMemory() error codes that trigger a retry with temporary
3147 PAGE_READONLY access. Note that this can occur on NT 4.0.
3149 2003-01-15 Christopher Faylor <cgf@redhat.com>
3151 * path.cc (normalize_posix_path): Convert win32 path separators to
3152 slashes when full path is specified.
3154 2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
3156 * cmalloc.cc (_cmalloc): Fix memory leak.
3158 2003-01-15 Corinna Vinschen <corinna@vinschen.de>
3160 * autoload.cc: Fix copyright date.
3161 * fhandler_dsp.cc: Ditto.
3166 * syscalls.cc: Ditto.
3170 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
3172 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
3173 Change ambiguous debug output.
3175 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
3177 * mmap.cc (mmap_record::access): Change argument type to caddr_t
3179 (mprotect): Protect against calling VirtualProtect() for shared
3181 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
3182 change protection of parent page to PAGE_READONLY, then try again.
3183 Revert protection afterwards.
3185 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3187 * syscalls.cc (system): Add pthread_testcancel call.
3188 * thread.cc: Update list of cancellation points.
3190 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3192 * wait.cc: Include thread.h
3193 (wait4): Add pthread_testcancel call.
3194 Wait for child process and cancellation event.
3195 * thread.cc: Update list of cancellation points.
3197 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3199 * signal.cc (sleep): Add pthread_testcancel call.
3200 Wait for signal and cancellation event.
3203 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3205 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
3206 Wait for signal and cancellation event.
3207 * thread.cc: Update list of cancellation points.
3209 2003-01-14 David Huang <davehzhr@hotmail.com>
3211 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
3214 2003-01-12 Christopher Faylor <cgf@redhat.com>
3216 * ntdll.h: Fix typo.
3218 2003-01-12 Corinna Vinschen <corinna@vinschen.de>
3220 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
3222 2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
3224 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
3225 (setacl): Start the search for a matching default at the next entry.
3226 Invalidate the type of merged entries instead of clearing it.
3227 Use well_known_creator for default owner and owning group and do
3228 not try to merge non-default and default entries in these cases.
3229 (getacl): Recognize well_known_creator for default owner and group.
3230 (acl_worker): Improve errno settings and streamline the nontsec case.
3231 * security.cc (write_sd): Remove the call to set_process_privilege.
3232 (alloc_sd): If the owner changes, call set_process_privilege and return
3233 immediately on failure. Change inheritance rules: on new directories add
3234 inherit only allow ACEs for creator_owner, creator_group and everyone.
3235 Preserve all inheritances through chmod and chown calls. Introduce
3236 isownergroup to implement the uid == gid case, to keep the inheritance
3237 code simple. Do not initialize owner_sid and group_sid and stop using
3240 2003-01-10 Christopher Faylor <cgf@redhat.com>
3242 * net.cc: Use gethostname define from winsock2.h.
3244 2003-01-10 Christopher Faylor <cgf@redhat.com>
3246 * path.cc: Unrevert below reversion except for
3247 mount_info::conv_to_posix_path part.
3249 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
3251 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
3252 rather than converting to posix.
3254 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
3256 * autoload.cc (gethostname): Make call optional, return 1 if function
3258 * net.cc (cygwin_gethostname): Call GetComputerName if return value
3259 of gethostname is non-zero.
3261 2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
3263 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
3264 versions and underscore variants.
3265 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
3267 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
3269 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
3271 2003-01-09 Christopher Faylor <cgf@redhat.com>
3273 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
3275 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
3276 that's what we're currently running at.
3278 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3280 * include/semaphore.h: Modify typedef for sem_t.
3281 * include/cygwin/types.h: Modify typedefs for pthread_t,
3282 pthread_mutex_t, pthread_key_t, pthread_attr_t,
3283 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
3284 pthread_rwlock_t and pthread_rwlockattr_t.
3286 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3288 * thread.h (WAIT_CANCELED): New define.
3289 (pthread::cancelable_wait): New static method.
3290 * thread.cc (pthread::cancelable_wait): Implement.
3291 (semaphore::Wait): Wait on semaphore and thread cancellation.
3292 (pthread::join): Wait on joined thread and thread cancellation.
3293 (semaphore::wait): Add testcancel to check for thread
3294 cancellation even if the semaphore is available.
3296 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3298 * include/pthread.h: Add define for errorchecking mutexes.
3299 Change default mutex type.
3300 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
3302 (pthread_mutex::pthread_mutex): New implement.
3303 (pthread_mutex::~pthread_mutex): Ditto.
3304 (pthread_mutex::Lock): Ditto.
3305 (pthread_mutex::TryLock): Ditto.
3306 (pthread_mutex::UnLock): Ditto.
3307 (pthread_mutex::Destroy): Implement new method.
3308 (pthread_mutex::SetOwner): Ditto.
3309 (pthread_mutex::LockRecursive): Ditto.
3310 (pthread_mutex::fixup_after_fork): Restore locking state after
3312 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
3313 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
3315 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
3317 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
3319 (__pthread_mutexattr_settype): Allow errorchecking and recursive
3321 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
3322 (pthread_mutex::criticalsection): Remove.
3323 (pthread_mutex::lock_counter): New member.
3324 (pthread_mutex::recursion_counter): Ditto.
3325 (pthread_mutex::owner): Ditto.
3326 (pthread_mutex::type): Ditto.
3327 (pthread_mutex::Destroy): New method.
3328 (pthread_mutex::SetOwner): Ditto.
3329 (pthread_mutex::LockRecursive): Ditto.
3331 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3333 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
3334 * thread.cc: Some white spaces cleanups.
3335 Change __pthread_cond_init to pthread_cond::init throughout.
3336 (nativeMutex): Move class methods outside pthread_mutex.
3337 (MTinterface::Init): Initialize pthread_cond init lock.
3338 (pthread_cond::condInitializationLock): Instantiate.
3339 (pthread_cond::initMutex): New Method.
3340 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
3341 * thread.h: Some white spaces cleanups.
3342 (nativeMutex): Move class declaration outside pthread_mutex.
3343 (pthread_cond::condInitializationLock): New static member.
3344 (pthread_cond::initMutex): New Method.
3345 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
3346 (__pthread_cond_init): Remove prototype.
3348 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
3350 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
3351 directory unreadable.
3353 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
3355 * security.cc (get_nt_attribute): Always return -1 when read_sd()
3357 (get_file_attribute): Set permissions to 0 and owner/group to -1
3358 if security descriptor is unreadable.
3360 2003-01-09 Christopher Faylor <cgf@redhat.com>
3362 Use isdirsep rather than SLASH_P throughout.
3363 * path.cc (iscygdrive): Disallow /cygdrive\x.
3364 (normalize_posix_path): "Normalize" a windows path, if detected, rather
3365 than converting to posix.
3367 2003-01-06 Troy Curtiss <troyc@usa.net>
3369 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
3370 capability checking for B230400 bitrate.
3371 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
3372 * include/sys/termios.h: Add B230400 definition for Posix support of
3375 2003-01-05 Christopher Faylor <cgf@redhat.com>
3377 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
3380 2003-01-03 Christopher Faylor <cgf@redhat.com>
3382 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
3384 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
3385 * pipe.cc (fhandler_pipe::close): Don't close read_state during
3386 fork_fixup since it wasn't inherited.
3388 2003-01-01 Christopher Faylor <cgf@redhat.com>
3390 * passwd.cc (getpwuid_r32): Revert previous change.
3392 2003-01-01 Christopher Faylor <cgf@redhat.com>
3394 * sysconf.cc (sysconf): Return arbitrary values for
3395 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
3397 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check