Corinna Vinschen [Thu, 12 Jun 2008 15:57:35 +0000 (15:57 +0000)]
* fhandler_console.cc (fhandler_console::open): Set console state last.
Only add ENABLE_PROCESSED_INPUT flag if this is the first time we open
the console.
* child_info.h (~child_info_spawn): Check moreinfo->myself_pinfo for
NULL before closing.
* spawn.cc (spawn_guts): Don't close moreinfo->myself_pinfo explicitely
in case of failing CloseProcess.
* exceptions.cc (_cygtls::handle_exceptions): Replace top level SEH
installed by Windows with our own handler.
* fhandler.cc (fhandler_base::open_): Return EISDIR when trying to
create a directory.
(fhandler_base::open_9x): Ditto.
* ntdll.h (STATUS_OBJECT_NAME_INVALID): Define.
* path.cc (path_conv::check): If input path had a trailing dir
separator, tack it on to the native path if directory doesn't exist.
2008-03-05 Christopher Faylor <me+cygwin@cgf.cx>
* exceptions.cc (_cygtls::handle_exceptions): Detect when signal is
masked and treat as if it was not caught. Revert to a 'return 0'
rather than using a goto.
* dtable.cc (dtable::init_std_file_from_handle): Set access to
read/write if handle is connected to a tty or console.
* fhandler_dsp.cc (fhandler_dev_dsp::dup): Set open flags correctly
after duplicating from archetype.
* fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
(fhandler_pty_master::dup): Ditto.
* cygtls.h (_cygtls::handle_threadlist_exception): Eliminate.
(_cygtls::init_threadlist_exceptions): Ditto.
* cygtls.cc (_cygtls::handle_threadlist_exception): Eliminate.
(_cygtls::init_threadlist_exceptions): Ditto.
(_cygtls::find_tls): Use myfault handling to deal with errors caused by
nonexistent threads.
* sigproc.cc (wait_sig): Eliminate call to init_threadlist_exceptions.
2008-03-01 Christopher Faylor <me+cygwin@cgf.cx>
* cygtls.cc (_cygtls::init_exception_handler): Just return.
2008-03-01 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (_cygtls::handle_exceptions): Only call rtl_unwind when
exiting. Just return, don't set thread context.
* gendef (_setjmp): Store %fs:0 in jmp_buf.
(_sjfault): Ditto.
(_ljfault): Restore %fs:0 from jmp_buf.
(_longjmp): Ditto.
Corinna Vinschen [Fri, 29 Feb 2008 16:38:02 +0000 (16:38 +0000)]
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call close_fs
instead of close to avoid calling close from wrong class when changing
a file system based device node.
(fhandler_disk_file::fchown): Ditto.
(fhandler_disk_file::facl): Ditto.
(fhandler_base::utimes_fs): Ditto.
* cygtls.cc (_cygtls::handle_threadlist_exception): Make it clear that
the function never actually returns.
* exceptions.cc (_cygtls::handle_exceptions): Jump out of function
rather than returning to avoid meddling by previously installed
exception handlers.
* dtable.cc (dtable::init_std_file_from_handle): Try harder to make a pipe into
a full-cygwin device.
(handle_to_fn): Change \ to / when necessary.
* fhandler.cc (fhandler_base::init): Change bin to mode.
* fhandler.h (fhandler_pipe::init): Declare.
* pipe.cc (fhandler_pipe::init): Define.
(handler_pipe::open): Move initialization code into init.
Corinna Vinschen [Wed, 13 Feb 2008 09:42:24 +0000 (09:42 +0000)]
* cygtls.cc (_cygtls::init_exception_handler): Revert patch
from 2005-12-02.
* exceptions.cc (stack_info::walk): Add workaround for NT 5.2
64 bit OSes.
* wincap.h (wincaps::has_restricted_stack_args): New element.
* wincap.cc: Implement above element throughout.
(wincapc::init): Reset has_restricted_stack_args if not running
under WOW64.
Brian Dessent [Sun, 23 Dec 2007 12:36:09 +0000 (12:36 +0000)]
* Makefile.in (cygcheck.exe): Don't link to ntdll.
* bloda.cc (pNtQuerySystemInformation): Add.
(pRtlAnsiStringToUnicodeString): Add.
(get_process_list): Use function pointers for NT functions.
(dump_dodgy_apps): Skip dodgy app check on non-NT platforms.
Use GetProcAddress for NT-specific functions.
Corinna Vinschen [Thu, 13 Dec 2007 17:19:46 +0000 (17:19 +0000)]
* poll.cc (poll): Return count of fds with events instead of total
event count.
* poll.cc (poll): Use POSIX type nfds_t for second parameter.
* include/sys/poll.h: Declare nfds_t. Use as type for second parameter
in poll(2) declaration.
Corinna Vinschen [Tue, 11 Dec 2007 13:04:17 +0000 (13:04 +0000)]
* libm/math/w_atan2.c: Fix atan2 to be consistent with glibc
(atan2(+0,-0), atan2(-0,-0) and atan(-0,+0))
* libm/math/wf_atan2.c: Ditto.
* libm/math/e_pow.c: Fix to be consistent with glibc with regards to
treatment of NaN and +-inf arguments.
* libm/math/ef_pow.c: Ditto.
* libm/math/w_pow.c: Ditto.
* libm/math/wf_pow.c: Ditto.
* libm/math/w_acos.c: Fix domain errors to return NaN.
* libm/math/w_asin.c: Ditto.
* libm/math/wf_acos.c: Ditto.
* libm/math/wf_asin.c: Ditto.
* libm/math/w_log.c: Fix to return NaN for negative number inputs.
* libm/math/wf_log.c: Ditto.
* libm/math/wf_log10.c: Ditto.
* libm/math/w_log10.c: Ditto.
* regtool.cc (key_type): Drop.
(REG_AUTO): Define.
(value_type): Replace key_type. Use REG_xxx values directly.
Accomodate change throughout.
(longopts): Add --dword, --dword-le, --none, --qword and --hex options.
(opts): Add -d, -D, -n, -Q and -x options.
(types): Array to convert REG_xxx into strings.
(hex): New variable to keep value of --hex option.
(usage): Accomodate new options. Print only the necessary by default.
Only be verbose in case of -h/--help option.
(cmd_list): Use key separator from -K option when printing.
Print value type when verbose option is given. Handle so far not
handled REG_xxx types.
(cmd_set): Avoid SEGV due to missing argument. Handle so far not
handled REG_xxx types.
(cmd_get): Handle --binary option type agnostic. Handle so far not
handled REG_xxx types.
(main): Handle new options.
* regtool.cc (longopts): Add --wow32 option.
(opts): Add -W option.
(usage): Add text for --wow32/-W option.
(main): Handle --wow32/-W option.
* utils.sgml: Document the new -W option.
* regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
WINVER to 0x0502 before including windows.h.
* regtool.cc (KEY_WOW64_64KEY): Define.
(longopts): Add --wow64 option.
(opts): Add -w option.
(wow64): New variable to control usage of KEY_WOW64_64KEY access flag.
(usage): Add text for --wow64/-w option.
(print_version): Fix copyright.
(find_key): Use wow64 value in calls to RegOpenKeyEx and RegCreateKeyEx.
(cmd_add): Use wow64 value in call to RegCreateKeyEx.
(regDeleteKeyEx): New function pointer to load RegDeleteKeyEx function
dynamically.
(cmd_remove): Load and use regDeleteKeyEx when wow64 is set.
(main): Handle --wow64/-w option.
* utils.sgml: Document the new -w option.
Corinna Vinschen [Thu, 29 Nov 2007 11:14:52 +0000 (11:14 +0000)]
Drop old SetResourceLock stuff in favor of mutos.
* dcrt0.cc (_reslock): Remove.
(__cygwin_user_data): Accommodate removal of resourcelocks member.
(dll_crt0_0): Don't initialize resourcelocks.
* exceptions.cc (_cygtls::signal_exit): Drop resourcelocks handling.
* mmap.cc (mmap_guard): New muto.
(LIST_LOCK): Define.
(LIST_UNLOCK): Define.
(mmap_list::search_record): Remove.
(mmap_list::try_map): Include code for anonymous case from
mmap_list::search_record.
(mmap_is_attached_or_noreserve): Access bookkeeping lists in a thread
safe way.
(mmap64): Replace SetResourceLock/ReleaseResourceLock by
LIST_LOCK/LIST_UNLOCK. Lock at the latest possible point.
(munmap): Replace SetResourceLock/ReleaseResourceLock by
LIST_LOCK/LIST_UNLOCK.
(msync): Ditto.
(mprotect): Ditto.
* thread.cc (ResourceLocks::Lock): Remove.
(SetResourceLock): Remove.
(ReleaseResourceLock): Remove.
(ResourceLocks::Init): Remove.
(ResourceLocks::Delete): Remove.
* thread.h (SetResourceLock): Drop declaration.
(ReleaseResourceLock): Ditto.
(class ResourceLocks): Drop definition.
* include/sys/cygwin.h (class ResourceLocks): Drop forward declaration.
(struct per_process): Replace resourcelocks with additional unused2
element.
(per_process_overwrite): Accommodate above change.
* mmap.cc: Convert usage of dynamically growing cmalloced arrays to
cmalloced linked lists throughout.
(class mmap_record): Add LIST_ENTRY element.
(mmap_record::match): New method, taking over match algorithm from
list::search_record.
(class mmap_list): Rename from class list. Add LIST_ENTRY. Convert
recs to a LIST_HEAD. Drop nrecs and maxrecs members.
(mmap_list::get_record): Drop entirely.
(mmap_list::free_recs): Drop entirely.
(mmap_list::del_record): Take mmap_record to delete as parameter.
(mmap_list::search_record): Convert to mmap_record::match.
(class mmap_areas): Rename from class map. Convert lists to LIST_HEAD.
(mmap_areas::get_list): Drop entirely.
(mmap_areas::del_list): Take mmap_list to delete as parameter.
(mprotect): Fix indentation.
Corinna Vinschen [Thu, 22 Nov 2007 11:10:48 +0000 (11:10 +0000)]
* fhandler_registry.cc (must_encode): New function.
(encode_regname): Ditto.
(decode_regname): Ditto.
(fhandler_registry::exists): Encode name before path compare.
(fhandler_registry::fstat): Pass decoded name to win32 registry call.
(fhandler_registry::readdir): Return encoded name to user.
(fhandler_registry::open): Store decoded name into value_name.
(open_key): Pass decoded name to win32 registry call.
Corinna Vinschen [Thu, 15 Nov 2007 20:32:12 +0000 (20:32 +0000)]
2007-03-01 Christopher Faylor <me@cgf.cx>
* fork.cc (fork): Reset child to true after fork since it may have been
reset by fork memory copies.
2007-02-22 Christopher Faylor <me@cgf.cx>
* fork.cc (frok::parent): Make argument volatile.
(frok::child): Ditto.
(lock_signals): New class.
(lock_pthread): Ditto.
(hold_everhthing): Ditto.
(frok::parent): Move atforkprepare and atforkparent to lock_pthread
class.
(fork): Make ischild boolean. Use hold_everything variable within
limited scope to set various mutexes in such a way as to avoid
deadlocks.
Corinna Vinschen [Wed, 14 Nov 2007 15:57:46 +0000 (15:57 +0000)]
2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/wcstombs_r.c: Add SUSV2 support for calculating
size if output buffer is NULL.
2007-10-13 Eric Blake <ebb9@byu.net>
* libc/stdio/vfprintf.c (_VFPRINTF_R) [__OPTIMIZE_SIZE__]:
Correctly nest else within conditionals.
Reported by Artur Lipowski.
2007-09-17 Eric Blake <ebb9@byu.net>
Obey POSIX on printf("%.s", (char*)NULL).
* libc/stdio/vfprintf.c (_VFPRINTF_R): Take precision into account
for %s on NULL. Skip NULL check when optimizing for size.
2007-07-31 Eric Blake <ebb9@byu.net>
More POSIX stream corner cases.
* libc/stdio/findfp.c (__sinit): Open stderr read/write.
* libc/stdio/fdopen.c (_fdopen_r): Set O_APPEND on fd when
requested.
* libc/stdio64/fdopen64.c (_fdopen64_r): Likewise.
2007-07-13 Eric Blake <ebb9@byu.net>
Fix fflush issues.
* libc/stdio/fflush.c (_fflush_r): New function.
(fflush): Fix reentrancy and large offset behavior.
* libc/include/stdio.h (_fflush_r): Add prototype.
* libc/stdio/fclose.c (_fclose_r): All fflush callers changed.
* libc/stdio/freopen.c (_freopen_r): Likewise.
* libc/stdio/fseek.c (_fseek_r): Likewise.
* libc/stdio/ftell.c (_ftell_r): Likewise.
* libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
* libc/stdio/refill.c (__srefill_r): Likewise.
* libc/stdio/setvbuf.c (setvbuf): Likewise.
* libc/stdio/ungetc.c (_ungetc_r): Likewise.
* libc/stdio/vfprintf.c (__sbprintf): Likewise.
* libc/stdio/wbuf.c (__swbuf_r): Likewise.
* libc/stdio64/freopen64.c (_freopen64_r): Likewise.
* libc/stdio64/fseeko64.c (_fseeko64_r): Likewise. Defer to
32-bit version if not large file.
* libc/stdio64/ftello64.c (_ftello64_r): Likewise.
* libc/stdio64/tmpfile64.c (_tmpfile64_r): Avoid compile warning.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' when
handling %p.
2007-05-25 Eric Blake <ebb9@byu.net>
* libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22.
2007-05-23 Eric Blake <ebb9@byu.net>
* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't truncate %p when
sizeof(void*) is 8 but sizeof(long) is 4.
* libc/stdio/vfscanf.c (__SVFSCANF_R): Likewise. Fix %i scanning
of "-0x". Support "-nan" and "inf" for %e. Audit usage of ungetc
to fix reentrancy and bug on encoding error in multibyte locales.
Always return EOF on read error.
2007-05-23 Eric Blake <ebb9@byu.net>
* libc/stdio/vfscanf.c (__SVFSCANF_R): Support scanf(%1$s).
Avoid warning when !FLOATING_POINT.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Simplify _NO_POS_ARGS
slightly.
2007-05-23 Corinna Vinschen <vinschen@redhat.com>
* libc/argz/argz_create_sep.c (argz_create_sep): Initialize *argz_len
to zero.
* libc/include/argz.h: Guard against multiple inclusion. Guard for
use with C++.
2007-05-17 Charles Wilson <cygwin@...>
* stdio/tmpfile.c: Include <sys/stat.h>.
* stdio64/tmpfile64.c: Ditto.
2007-05-16 Eric Blake <ebb9@byu.net>
Close security hole in tmpfile.
* libc/stdio/tmpfile.c (_tmpfile_r): Avoid window between filename
generation and opening the fd.
* libc/stdio64/tmpfile64.c (_tmpfile64_r): Likewise.
* libc/include/math.h (INFINITY, NAN, FP_ILOGB0, FP_ILOGBNAN)
(MATH_ERRNO, MATH_ERREXCEPT, math_errhandling): Add macros
required by POSIX.
* libc/stdlib/ldtoa.c (USE_INFINITY): Rename from INFINITY, to
avoid clash with <math.h>.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix use of decimal point
in %f and %e. Avoid malloc when possible for %S.
(BUF): Improve stack locality by using smaller size.
(MAXEXP): Define.
(exponent): Use for smaller stack size.
* libc/stdio/vfprintf.c (get_arg): Support %1$lc. Simplify types
that promote to int.
2007-04-24 Eric Blake <ebb9@byu.net>
* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinity
or NaN with %05f.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Avoid multibyte when not
_MB_CAPABLE.
* libc/include/limits.h (NL_ARGMAX): Define a default value.
* libc/stdio/vfprintf.c (MAX_POS_ARGS): Define in terms of
NL_ARGMAX, if present.
2007-04-23 Brian Dessent <brian@dessent.net>
* libc/stdio/vfprintf.c (_vfprintf_r): When the alternate-form flag
has been specified with types 'f', 'F', 'g', or 'G', ensure the
trailing decimal is printed.
2007-04-17 Brian Dessent <brian@dessent.net>
* libc/stdio/sscanf.c: Update documentation comments.
* libc/stdio/vfscanf.c (__SVFSCANF_R): Handle j, t, and z modifiers.
2007-04-12 Eric Blake <ebb9@byu.net>
* libc/stdio/vfprintf.c (_VFPRINTF_F, cvt): Don't confuse %F with %e.
(chclass): Recognize 'F', 'X', 'n', and not 'W'.
(get_arg): Handle %1$F, %1$n.
2007-04-10 Eric Blake <ebb9@byu.net>
* libc/include/stdio.h (_ELIDABLE_INLINE): Work even when using
CFLAGS=-O0.
2007-04-09 Eric Blake <ebb9@byu.net>
* libc/include/stdio.h: Add gcc format attributes to printf and
scanf families.
2007-04-04 Jeff Johnston <jjohnstn@redhat.com>
* libc/argz/argz_insert.c: Add stddef.h to get ptrdiff_t type.
* libc/include/stdio.h (_ELIDABLE_INLINE): New macro to conceal
conflicting inline semantics between C99 and GNU89.
(__sgetc_r): Replace static inline with _ELIDABLE_INLINE to be
compatible with -fkeep-inline-functions usage.
(__sputc_r): Likewise for consistency even though disabled.
2007-03-16 Charles Wilson <cygwin@...>
* libc/argz/argz_insert.c: "before" pointer is
invalid after *argz realloc. Compute offset
between "before" and *argz, and use it after
reallocation instead.
Corinna Vinschen [Mon, 12 Nov 2007 15:31:45 +0000 (15:31 +0000)]
2007-08-31 Dave Korn <dave.korn@artimi.com>
* mkgroup.c (enum_groups): Use MAX_PREFERRED_LENGTH in netgroupenum
call so that it will automatically size returned buffer sufficiently.
2007-08-03 Dave Korn <dave.korn@artimi.com>
* Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjusting
dependency-filtering $(wordlist ...) call appropriately. Link ntdll.
(bloda.o): New rule to build bloda.o
* cygcheck.cc (dump_sysinfo): Call bloda function dump_dodgy_apps().
* bloda.cc: New file implements detection of applications from the
Big List Of Dodgy Apps.
2007-07-24 Corinna Vinschen <corinna@vinschen.de>
* COPYING.dumper: New file.
* dumper.cc: Change license to plain GPLv2 + later.
* dumper.h: Ditto.
* parse_pe.cc: Ditto.
2007-07-23 Christopher Faylor <me+cygwin@cgf.cx>
* strace.cc (create_child): Don't convert a path from cygwin format
unless it has a slash.
2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
* strace.cc (usage): Add missing description for -q.
2007-05-29 Pedro Alves <pedro_alves@portugalmail.pt>
* dumper.cc (dumper::prepare_core_dump): Record a phdr for each section.
2007-03-30 Mark Mitchell <mark@codesourcery.com>
* utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned
by FindFirstFile.
2006-09-11 Eric Blake <ebb9@byu.net>
* cygcheck.cc (main): Restore POSIXLY_CORRECT before displaying user's
environment.
2006-08-03 Corinna Vinschen <corinna@vinschen.de>
* path.cc (vconcat): Don't convert backslahes to slashes.
(cygpath): Return native path with all backslashes.
2006-07-30 Ilya Bobir <ilya@po4ta.com>
* cygpath.cc (get_long_name): Fallback to get_long_path_name_w32impl.
2006-07-27 Corinna Vinschen <corinna@vinschen.de>
* cygpath.c (get_long_name): Cover the case that GetLongPathName
doesn't return valid information for non-existant files. Just return
incoming filename in that case.
Corinna Vinschen [Mon, 12 Nov 2007 15:30:20 +0000 (15:30 +0000)]
2007-11-08 Christopher Faylor <me+cygwin@cgf.cx>
* dllfixdbg: Eliminate extra objcopy step.
2007-11-07 Pedro Alves <pedro_alves@portugalmail.pt>
* dllfixdbg: Pass --only-keep-debug to objcopy, instead of
selecting the sections manually.
2007-11-06 Corinna Vinschen <corinna@vinschen.de>
* thread.cc (pthread_key_create): Drop check for incoming valid object.
2007-11-06 Corinna Vinschen <corinna@vinschen.de>
* shm.cc: Include sync.h
(struct shm_shmid_list): Add ref_count member.
(struct shm_attached_list): Remove hdl and size members. Add a parent
member pointing to referenced shm_shmid_list entry.
(shm_guard): New muto.
(SLIST_LOCK): Define.
(SLIST_UNLOCK): Define.
(fixup_shms_after_fork): Use hdl and size members of parent
shm_shmid_list entry.
(shmat): Access sequential bookkeeping lists in a thread safe way.
Accommodate change in list element layout. Align comments.
(shmctl): Ditto.
(shmdt): Ditto.
(shmget): Ditto.
2007-11-05 Corinna Vinschen <corinna@vinschen.de>
* shm.cc (shmctl): On IPC_RMID don't unmap views and don't close handle
if the map is still referenced to emulate Linux and BSD behaviour.
2007-11-05 Corinna Vinschen <corinna@vinschen.de>
* shm.cc (shmctl): On IPC_RMID also unmap all views on shared mem
as well as connected shm_attached_list entry.
2007-10-30 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't remove
write bits for directories with R/O attribute.
(fhandler_base::fhaccess): Don't shortcircuit R/O attribute with W_OK
scenarios for directories.
2007-09-26 Corinna Vinschen <corinna@vinschen.de>
* termios.cc (setspeed): Support new baud rates introduced 2007-02-05.
2007-09-18 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (fh_disk_file): Delete as global static variable and...
(mmap64): ...define as local pointer to make mmap thread-safe.
Accommodate throughout. Only initialize fh_disk_file after file could
be opened with GENERIC_EXECUTE access.
2007-09-06 Brian Dessent <brian@dessent.net>
* include/sys/stdio.h (_flockfile): Don't try to lock a FILE
that has the __SSTR flag set.
(_ftrylockfile): Likewise.
(_funlockfile): Likewise.
2007-08-24 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (open): Don't follow symlinks if O_EXCL is given.
* gendef (sigbe): Reset "incyg" while the stack lock is active to avoid
a potential race.
2007-08-01 Corinna Vinschen <corinna@vinschen.de>
* localtime.cc (tzsetwall): Don't set TZ.
2007-07-17 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fhaccess): Add check for R/O file system.
2007-07-14 Christopher Faylor <me+cygwin@cgf.cx>
* init.cc (in_dllentry): Delete.
(dll_entry): Remove assignment to deleted variable.
* winsup.h (in_dllentry): Delete declaration.
* exceptions.cc (inside_kernel): Use another method to see if we are in
dll_entry phase.
2007-07-14 Christopher Faylor <me+cygwin@cgf.cx>
* init.cc (in_dllentry): Make NO_COPY to avoid spurious false positives.
2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
* dlfcn.cc (dlclose): Don't close handle returned from
GetModuleHandle(NULL).
2007-07-06 Corinna Vinschen <corinna@vinschen.de>
* times.cc (gettimeofday): Align definition to POSIX.
2007-07-04 Corinna Vinschen <corinna@vinschen.de>
* times.cc: Define __timezonefunc__ before including time.h to protect
definition of timezone function.
2007-07-04 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/time.h: Switch to timezone variable by default. Add
comment.
2007-06-27 Corinna Vinschen <corinna@vinschen.de>
* shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
(CURR_SHARED_MAGIC): Ditto.
(class shared_info): Add heap_slop_inited member.
* shared.cc (shared_info::heap_slop_size): Use heap_slop_inited to
track initializing heap_slop since 0 is a valid value for heap_slop.
Drop useless < 0 consideration.
2007-06-12 Christopher Faylor <me+cygwin@cgf.cx>
* signal.cc (usleep): Use useconds_t for the type as per POSIX.
2007-06-12 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fstat): Set pipe permission bits more
correctly.
2007-05-29 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (dtable::set_file_pointers_for_exec): Call SetFilePointer
correctly for 64 bit file access. Comment out functionality.
* fhandler.cc (fhandler_base::open): Don't set append_mode.
(fhandler_base::write): Check for O_APPEND instead of append_mode.
Call SetFilePointer correctly for 64 bit file access. Handle
errors from SetFilePointer.
* fhandler.h (class fhandler_base): Drop append_mode status flag.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Handle
seeking correctly for 64 bit file access.
2007-05-21 Christian Franke <franke@computer.org>
* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Don't invalidate
devbuf if new position is within buffered range.
2007-05-21 Eric Blake <ebb9@byu.net>
* include/search.h (hsearch_r): Provide declaration.
2007-05-21 Christian Franke <franke@computer.org>
Corinna Vinschen <corinna@vinschen.de>
* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Set buf size to
sector size. Simplify non-sector aligned case. Handle errors from
raw_read.
2007-05-15 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (adjust_socket_file_mode): New inline function.
(fhandler_socket::fchmod): Squeeze mode through adjust_socket_file_mode
before using it.
(fhandler_socket::bind): Ditto.
2007-04-18 Brian Dessent <brian@dessent.net>
* cygwin.sc: Remove duplicated .debug_macinfo section.
* dllfixdbg: Also copy DWARF-2 sections into .dbg file.
* fhandler.cc (fhandler_base::fstat): Set all file times to arbitrary
fixed value.
2007-02-20 Christopher Faylor <me@cgf.cx>
* exceptions.cc (_cygtls::signal_exit): Only call myself.exit when when
exit_state indicates that we've visited do_exit.
* sync.h (lock_process::lock_process): Use renamed exit_state -
ES_PROCESS_LOCKED.
* winsup.h: Rename ES_MUTO_SET to ES_PROCESS_LOCKED.
2007-02-20 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::bind): Remove printing wrong
errno in debug output.
2007-02-05 Corinna Vinschen <corinna@vinschen.de>
* fhandler_serial.cc (fhandler_serial::tcsetattr): Add support for
baud rates up to 3000000 baud. Add missing 128K and 256K cases.
(fhandler_serial::tcgetattr): Ditto.
* include/sys/termios.h: Add baud rate definitions from B460800 up to B3000000.
2007-01-04 Brian Ford <Brian.Ford@FlightSafety.com>
Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
* fhandler.cc (fhandler_base::fstat): Set st_blksize to
PREFERRED_IO_BLKSIZE.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
* fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
2006-11-08 Corinna Vinschen <corinna@vinschen.de>
* security.cc (get_token_group_sidlist): Always add the local
group to the token.
2006-07-14 Corinna Vinschen <corinna@vinschen.de>
* security.cc (get_token_group_sidlist): Always add the interactive
group to the token. Create logon_id group SID by copying it from
incoming group list.
Corinna Vinschen [Mon, 12 Nov 2007 15:25:49 +0000 (15:25 +0000)]
2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/time.h (gettimeofday): Change to proper
prototype where second parameter is void *.
* libc/include/reent.h: Fix prototype for _gettimeofday_r.
* libc/time/timer.c (_gettimeofday_r): Change prototype accordingly.
2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/unistd.h: Change usleep prototype to Posix.
2007-01-05 Brian Ford <Brian.Ford@FlightSafety.com>
Brian Dessent [Fri, 29 Jun 2007 18:55:50 +0000 (18:55 +0000)]
Backport from HEAD:
* cygwin-api.in.sgml: Remove authorgroup and revhistory.
* cygwin-ug.in.sgml: Add Joshua Daniel Franklin to authorgroup.
Remove revhistory.
* legal.sgml: Update dates.
Corinna Vinschen [Mon, 15 Jan 2007 11:56:07 +0000 (11:56 +0000)]
2007-01-13 Christopher Faylor <me@cgf.cx>
* glob.cc: Update copyright notice with latest from FreeBSD.
(glob0): Use correct type for c variable to propagate previously
detected protection.
2007-01-12 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (_csbrk): Fix off-by-one error.
* cygwin.sc: Give .cygheap a minimum size of 512K.
2007-01-12 Corinna Vinschen <corinna@vinschen.de>
* fork.cc (child_copy): Add missing Windows PID in debug output.
2007-01-12 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc: Update copyright.
2007-01-10 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
useful, valid address before the actual mappings take place.
Fix typo in comment.
2007-01-10 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu).
2007-01-09 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks.
2007-01-01 Christopher Faylor <me@cgf.cx>
* spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin
_P_NOWAIT process.
2006-12-12 Christopher Faylor <me@cgf.cx>
* syscalls.cc (popen): Allow '[rw][bt]'.
2006-12-11 Christopher Faylor <me@cgf.cx>
* sigproc.cc (child_info::child_info): Move old comment about msv_count
here. Edit it slightly to reflect new sensibilities.
2006-12-11 Christopher Faylor <me+cygwin@cgf.cx>
* child_info.h (child_info_spawn::__stdin): New element.
(child_info_spawn::__stdin): Ditto.
(CURR_CHILD_INFO_MAGIC): Regenerate.
* dcrt0.cc (check_sanity_and_sync): Minor cleanup.
(child_info_spawn::handle_spawn): Handle new __std* elements by calling
move_fd.
* dtable.cc (dtable::move_fd): Define new function.
* dtable.h (dtable::move_fd): Declare new function.
* fhandler.h (fhandler_pipe::popen_pid): Declare new element.
* fhandler.h (fhandler_pipe::get_popen_pid): Define new function.
* fhandler.h (fhandler_pipe::set_popen_pid): Ditto.
* pipe.cc (fhandler_pipe::fhandler_pipe): Zero popen_pid.
(fhandler_pipe::dup): Ditto.
* spawn.cc (handle): Change second argument to bool.
(spawn_guts): Accept __stdin/__stdout arguments and set them
appropriately in child_info structure and in STARTUPINFO structure.
* syscalls.cc (popen): New cygwin-specific implementation using spawn.
(pclose): Ditto.
* winsup.h (spawn_guts): Accommodate new arguments for spawn_guts.
* fhandler.cc (fhandler_base::set_no_inheritance): Make second arg a bool.
* fhandler.h (fhandler_base::set_no_inheritance): Ditto for declaration.
* child_info.h (child_info::msv_count): Rename from the now-inappropriate
"zero".
(child_info_spawn::filler): Add filler to work around Vista bug.
(child_info_fork::filler): Ditto.
* dcrt0.cc (get_cygwin_startup_info): Remove "zero" check since it is
now always filled out.
* fork.cc (frok::parent): Move ch.zero manipulation to constructor.
* spawn.cc (spawn_guts): Ditto. Remove _ch wrapper.
* sigproc.cc (child_info::child_info): Initialize starter[].
Corinna Vinschen [Fri, 15 Dec 2006 10:02:30 +0000 (10:02 +0000)]
* libc/stdio/fflush.c (fflush): On seekable streams, always flush
read but unused data.
* libc/stdio/fclose.c (_fclose_r): Always flush streams, since
even read streams may have side effects that must happen.
* dcrt0.cc (get_cygwin_startup_info): Change zeros to DWORD array.
Expect first DWORD in child_info struct being set to non-zero if
wincap.needs_count_in_si_lpres2 is set. Add comment to explain why.
* fork.cc (frok::parent): Set ch.zero[0] to a sensible count value
if wincap.needs_count_in_si_lpres2 is set.
* spawn.cc (spawn_guts): Ditto. Add filler bytes after ch on stack
to accomodate needs_count_in_si_lpres2.
* wincap.h: Define needs_count_in_si_lpres2 throughout.
* wincap.cc: Ditto.
Corinna Vinschen [Wed, 29 Nov 2006 13:23:24 +0000 (13:23 +0000)]
2006-11-28 Corinna Vinschen <corinna@vinschen.de>
* security.cc (create_token): Revert erroneous change to test
subauth_token for INVAILD_HANDLE_VALUE.
* syscalls.cc (seteuid32): Set create_token's subauth_token parameter
back to NULL.
2006-11-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::open): Fix previous patch to handle the
SYSTEM attribute as well.
2006-11-27 Christopher Faylor <cgf@timesys.com>
* include/cygwin/signal.h: Add __extension__ to various anonymous
unions and structs. (thanks to V.Haisman)
Corinna Vinschen [Thu, 19 Oct 2006 08:57:48 +0000 (08:57 +0000)]
* glob.c: Remove.
* glob.cc: New file. Latest glob version from FreeBSD plus Cygwin
specific changes (__stat64/__stat32, ignore_case_with_glob,
drop collate functions).
(glob3): Return GLOB_ABORTED in case directory is unreadable and
GLOB_ERR is set, as demanded by SUSv3.
* glob.h: Import latest version from FreeBSD.
* libc/posix/popen.c (popen): Don't close output end of pipe in
child if stdout was closed on entry.
[HAVE_FCNTL]: In parent, mark file as close-on-exec, per POSIX.
2006-08-17 Brian Ford <Brian.Ford@FlightSafety.com>
* libc/time/gmtime.c: Correct man page; clock is not a
local time and no conversion occurs.
Corinna Vinschen [Mon, 16 Oct 2006 12:46:34 +0000 (12:46 +0000)]
* include/asm/byteorder.h: Fix copyright dates.
* autoload.cc (PrivilegeCheck): Define.
* fhandler.cc (fhandler_base::open): Always try opening with backup
resp. restore intent.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Always try
opening with backup intent.
(fhandler_disk_file::readdir): Ditto when trying to retrieve file id
explicitely.
* security.cc (check_file_access): Replace pbuf with correctly
PPRIVILEGE_SET typed pset. Check explicitely for backup and/or restore
privileges when AccessCheck fails, to circumvent AccessCheck
shortcoming. Add comment to explain.
* include/asm/byteorder.h: Correct typo.
* include/asm/byteorder.h: Don't #define n* macros if -fnoinline is
specified.
* environ.cc (build_env): Don't put an empty environment variable into
the environment. Optimize use of "len".
* errno.cc (ERROR_MORE_DATA): Translate to EMSGSIZE rather than EAGAIN.
Corinna Vinschen [Thu, 17 Aug 2006 14:51:58 +0000 (14:51 +0000)]
* fhandler_serial.cc (raw_read): Evaluate minchars taking the
vmin_ > ulen case into account. Simplify evaluating the bytes to read.
Don't use bytes in Queue value from ClearCommError call in case vtime_
is > 0. Reformat GetOverlappedResult call. Simplify call to ReadFile.
Paolo Bonzini [Tue, 25 Jul 2006 08:39:57 +0000 (08:39 +0000)]
Sync from GCC
2006-07-04 Eric Botcazou <ebotcazou@libertysurf.fr>
PR bootstrap/18058
* configure.in: Add -fkeep-inline-functions to CFLAGS for stage 1
if the bootstrap compiler is a GCC version that supports it.
* configure: Regenerate.
config:
2006-07-21 David Daney <ddaney@avtrex.com>
PR libgcj/28426
* gxx-include-dir.m4: Use target_alias in path for cross build.
* Makefile.in: Update copyright. Fix 'check' target so that it will once-again
create a working testsuite directory. Add a comment this time to explain the
unusual behavior.
(Previous ChangeLog checkin did not include accompanying Makefile.in)
Chris Sutcliffe [Sat, 22 Jul 2006 12:06:11 +0000 (12:06 +0000)]
2006-07-20 Elias Naur <elias_naur@users.sourceforge.net>
* include/devguid.h: Add new file with missing GUID_DEVCLASS_*
declarations. They were extracted from the registry with a script.
* lib/devguid.c: Add new file with the implementation of the
missing GUIDs.
* lib/Makefile.in: Add devguid.c to UUID_SOURCES and UUID_OBJS.