]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
13 years ago2011-05-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
Chris Sutcliffe [Mon, 23 May 2011 00:03:22 +0000 (00:03 +0000)]
2011-05-22  Chris Sutcliffe  <ir0nh34d@users.sourceforge.net>

        * include/wchar.h: Include stdio.h to grab definition of FILENAME_MAX.

        Thanks to Jim Bell for the report and Greg Chicares for the fix.

13 years ago * fhandler_process.cc (struct dos_drive_mappings): Use malloc/free
Corinna Vinschen [Sat, 21 May 2011 15:57:16 +0000 (15:57 +0000)]
* fhandler_process.cc (struct dos_drive_mappings): Use malloc/free
rather than cmalloc/cfree.  Check return value from malloc before
using it.
(struct heap_info): Ditto.
(struct thread_info): Ditto.  Rename from stack_info.  Rename members
and local variables accordingly.
(thread_info::thread_info): Store stack and TEB addresses.
(thread_info::fill_if_match): Print "teb" if a TEB address has been
found.  Special case for WOW64, explain why.
(format_process_maps): Fetch PEB address.  Print MEM_RESERVE regions
with equal signs to distinguish them from PAGE_NOACCESS regions.  Fix
printing of 'p' and 's' to differ between MEM_PRIVATE and MEM_MAPPED
pages, as on Linux.  Print 'g' instead of 'p for PAGE_GUARD pages.
Print PEB and SharedUserData area if recognized.

13 years ago * miscfuncs.cc (CygwinCreateThread): Fix condition for adding the
Corinna Vinschen [Fri, 20 May 2011 19:00:51 +0000 (19:00 +0000)]
* miscfuncs.cc (CygwinCreateThread): Fix condition for adding the
guardsize to the stacksize.  Fix accompanying comment.

13 years ago * miscfuncs.cc (CygwinCreateThread): Add accidentally missing comment.
Corinna Vinschen [Fri, 20 May 2011 18:15:12 +0000 (18:15 +0000)]
* miscfuncs.cc (CygwinCreateThread): Add accidentally missing comment.

13 years ago * fhandler_process.cc (struct heap_info): Change type of base and end
Corinna Vinschen [Fri, 20 May 2011 18:07:52 +0000 (18:07 +0000)]
* fhandler_process.cc (struct heap_info): Change type of base and end
members to char *.  Print "shared" rather than "share".
(struct stack_info): New class to fetch process stack information.
(format_process_maps): Initialize and check for stack information.

13 years ago * miscfuncs.cc (thread_wrapper): Remove statements added for debugging
Corinna Vinschen [Fri, 20 May 2011 07:39:20 +0000 (07:39 +0000)]
* miscfuncs.cc (thread_wrapper): Remove statements added for debugging
purposes.

13 years ago * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
Corinna Vinschen [Fri, 20 May 2011 07:23:11 +0000 (07:23 +0000)]
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
(class child_info_fork): Remove stacksize, add stackaddr and guardsize
members.
* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Partial rewrite
to regenerate the stack exactly as in the parent.
(child_info_fork::alloc_stack): Set stackaddr to 0, rather than
stacksize.
(dll_crt0_1): Check for stackaddr before changing the stack addresses
in the TEB.
* fork.cc (frok::child): Check for stackaddr here.
(frok::parent): Set ch.stackaddr and ch.guardsize if not called from
the main thread.
* init.cc (dll_entry): Replace pointer to NT_TIB with pointer to TEB.
Fix incorrectly changed address test before removing _my_tls.
Set StackLimit to NULL on Windows 2000.  Explain why.
* miscfuncs.cc (struct thread_wrapper_arg): Store stackbase rather
than stacksize, store commitaddr, remove guardsize.  Store all pointers
as char * for easier address arithmetic.
(thread_wrapper): Rewrite to remove OS stack before calling thread
function.  Add lots of comments to explain what we do.
(CygwinCreateThread): Reserve our own stack in case we got no
application stack.  Add comments.
* ntdll.h (struct _TEB): Extend defintion up to DeallocationStack
member.
* thread.cc (pthread_attr::pthread_attr): Use "(size_t) -1"
rather then 0xffffffff.
* wincap.h (wincaps::has_stack_size_param_is_a_reservation): New
element.
* wincap.cc: Implement above element throughout.

13 years ago* thread.cc: Mark psiginfo and psignal as available in list of
Yaakov Selkowitz [Thu, 19 May 2011 23:44:55 +0000 (23:44 +0000)]
* thread.cc: Mark psiginfo and psignal as available in list of
optional cancellation points.

13 years ago* new-features.sgml (ov-new1.7.10): Document __fpurge.
Yaakov Selkowitz [Thu, 19 May 2011 07:24:23 +0000 (07:24 +0000)]
* new-features.sgml (ov-new1.7.10): Document __fpurge.

13 years ago* cygwin.din (__fpurge): Export.
Yaakov Selkowitz [Thu, 19 May 2011 07:23:29 +0000 (07:23 +0000)]
* cygwin.din (__fpurge): Export.
* posix.sgml (std-solaris): Add __fpurge.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

13 years ago* libc/include/stdio_ext.h: New header.
Yaakov Selkowitz [Thu, 19 May 2011 07:21:42 +0000 (07:21 +0000)]
* libc/include/stdio_ext.h: New header.
* libc/stdio/fpurge.c [!__rtems__] (__fpurge): New function.

13 years ago * Makefile.am (install-data-local): Fix condition and rm call.
Corinna Vinschen [Thu, 19 May 2011 06:04:59 +0000 (06:04 +0000)]
* Makefile.am (install-data-local): Fix condition and rm call.
* Makefile.in: Regenerate.

13 years ago* posix.sgml (std-susv4): Remove chroot, futimes, hstrerror.
Yaakov Selkowitz [Wed, 18 May 2011 21:46:54 +0000 (21:46 +0000)]
* posix.sgml (std-susv4): Remove chroot, futimes, hstrerror.
(std-deprec): Add chroot.
(std-bsd): Add futimes, hstrerror.
(std-notimpl): Add clock_nanosleep, nexttoward, nexttowardf.
Remove initstate, which is implemented and listed in std-susv4.

13 years ago* new-features.sgml (ov-new1.7.10): Document error.h functions.
Yaakov Selkowitz [Wed, 18 May 2011 01:26:56 +0000 (01:26 +0000)]
* new-features.sgml (ov-new1.7.10): Document error.h functions.

13 years ago* cygwin.din (error): Export.
Yaakov Selkowitz [Wed, 18 May 2011 01:25:41 +0000 (01:25 +0000)]
* cygwin.din (error): Export.
(error_at_line): Export.
(error_message_count): Export.
(error_one_per_line): Export.
(error_print_progname): Export.
* errno.cc (error_message_count): Define.
(error_one_per_line): Define.
(error_print_progname): Define.
(_verror): New static function.
(error): New function.
(error_at_line): New function.
* posix.sgml (std-gnu): Add error, error_at_line.
* include/error.h: New header.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

13 years ago* new-features.sgml (ov-new1.7.10): Document CPU-time clock support.
Yaakov Selkowitz [Tue, 17 May 2011 17:09:32 +0000 (17:09 +0000)]
* new-features.sgml (ov-new1.7.10): Document CPU-time clock support.
Move pthread stack management APIs to separate listitem.

13 years ago* cygwin.din (clock_getcpuclockid): Export.
Yaakov Selkowitz [Tue, 17 May 2011 17:08:10 +0000 (17:08 +0000)]
* cygwin.din (clock_getcpuclockid): Export.
(pthread_getcpuclockid): Export.
* hires.h (PID_TO_CLOCKID): New macro.
(CLOCKID_TO_PID): New macro.
(CLOCKID_IS_PROCESS): New macro.
(THREADID_TO_CLOCKID): New macro.
(CLOCKID_TO_THREADID): New macro.
(CLOCKID_IS_THREAD): New macro.
* ntdll.h (enum _THREAD_INFORMATION_CLASS): Add ThreadTimes.
* posix.sgml (std-notimpl): Add clock_getcpuclockid and
pthread_getcpuclockid from here...
(std-susv4): ... to here.
(std-notes): Remove limitations of clock_getres and clock_gettime.
Note limitation of timer_create to CLOCK_REALTIME.
* sysconf.cc (sca): Set _SC_CPUTIME to _POSIX_CPUTIME, and
_SC_THREAD_CPUTIME to _POSIX_THREAD_CPUTIME.
* thread.cc (pthread_getcpuclockid): New function.
* timer.cc (timer_create): Set errno to ENOTSUP for CPU-time clocks.
* times.cc (clock_gettime): Handle CLOCK_PROCESS_CPUTIME_ID and
CLOCK_THREAD_CPUTIME_ID.
(clock_getres): Ditto.
(clock_settime): Set errno to EPERM for CPU-time clocks.
(clock_getcpuclockid): New function.
* include/pthread.h (pthread_getcpuclockid): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

13 years ago * miscfuncs.cc (thread_wrapper): Remove unused _cygtls record.
Corinna Vinschen [Tue, 17 May 2011 15:37:01 +0000 (15:37 +0000)]
* miscfuncs.cc (thread_wrapper): Remove unused _cygtls record.
* mmap.cc (is_mmapped_region): Avoid crash if no mmaps exist.

13 years ago PR ld/12760
Alan Modra [Tue, 17 May 2011 13:02:16 +0000 (13:02 +0000)]
PR ld/12760
include/
* bfdlink.h (struct bfd_link_callbacks <notice>): Add "flags" and
"string" param.
bfd/
* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
* elflink.c (elf_link_add_object_symbols): Likewise.
* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
ld/
* ldmain.c (notice): Add "flags" and "string" param.
* plugin.c (plugin_notice): Likewise.  Handle indirect, warning
and constructor syms.

13 years ago* libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
Yaakov Selkowitz [Mon, 16 May 2011 22:35:10 +0000 (22:35 +0000)]
* libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
CLOCK_PROCESS_CPUTIME.
(CLOCK_THREAD_CPUTIME_ID): Rename from CLOCK_THREAD_CPUTIME.
* libc/include/sys/features.h [__CYGWIN__] (_POSIX_CPUTIME): Define.
(_POSIX_THREAD_CPUTIME): Define.

13 years ago * globals.cc (__getlogin_username): Remove.
Corinna Vinschen [Mon, 16 May 2011 17:58:21 +0000 (17:58 +0000)]
* globals.cc (__getlogin_username): Remove.
* uinfo.cc (getlogin_r): Fetch username from cygheap.
(getlogin): Add static buffer username and fetch username from
getlogin_r.

13 years ago * cygtls.h (struct _local_storage): Remove unused members rarg and
Corinna Vinschen [Mon, 16 May 2011 15:12:35 +0000 (15:12 +0000)]
* cygtls.h (struct _local_storage): Remove unused members rarg and
_localtime_buf.  Remove username in favor of a global buffer.  Reorder
slightly to keep the net.cc stuff together.
* globals.cc (__getlogin_username): New global char buffer.
* tlsoffsets.h: Regenerate.
* uinfo.cc (getlogin): Copy username into __getlogin_username.

13 years ago * libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed
Corinna Vinschen [Mon, 16 May 2011 13:34:06 +0000 (13:34 +0000)]
* libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed
DBL_DIG.

13 years ago * heap.cc (heap_init): Rewrite initial heap allocation to use addresses
Corinna Vinschen [Mon, 16 May 2011 10:27:14 +0000 (10:27 +0000)]
* heap.cc (heap_init): Rewrite initial heap allocation to use addresses
beyond 0x20000000.  Explain why and how.
* shared.cc (shared_info::heap_slop_size): Remove.
* shared_info.h (class shared_info): Remove heap_slop_inited and
heap_slop members.  Remove heap_slop_size declaration.
(CURR_SHARED_MAGIC): Update.
* wincap.cc: Throughout, drop heapslop.
* wincap.h (struct wincaps): Drop heapslop.

13 years ago * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Check if the
Corinna Vinschen [Mon, 16 May 2011 09:55:18 +0000 (09:55 +0000)]
* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Check if the
requested stack is application-provided within the user heap or an
mmapped region.  If so, just use it.  Add comment to explain why.
* miscfuncs.cc (thread_wrapper): If an application-provided stack
has been given, implement cygtls area at the stackbase.  Fix comment.
* mmap.cc (is_mmapped_region): New function.
* winsup.h (is_mmapped_region): Declare.

13 years agoinclude/
Alan Modra [Sun, 15 May 2011 23:44:06 +0000 (23:44 +0000)]
include/
* bfdlink.h (struct bfd_link_hash_entry): Remove u.undef.weak field.
bfd/
* linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.

13 years ago * miscfuncs.cc (thread_wrapper): Add comments to assembler code.
Corinna Vinschen [Sun, 15 May 2011 19:04:41 +0000 (19:04 +0000)]
* miscfuncs.cc (thread_wrapper): Add comments to assembler code.

13 years ago * new-features.sgml (ov-new1.7.10): Document pthread_attr_getguardsize,
Corinna Vinschen [Sun, 15 May 2011 18:51:49 +0000 (18:51 +0000)]
* new-features.sgml (ov-new1.7.10): Document pthread_attr_getguardsize,
pthread_attr_setstack, pthread_attr_setstackaddr and
pthread_attr_setguardsize.

13 years ago * libc/include/sys/features.h (_POSIX_THREAD_ATTR_STACKADDR): Define
Corinna Vinschen [Sun, 15 May 2011 18:50:52 +0000 (18:50 +0000)]
* libc/include/sys/features.h (_POSIX_THREAD_ATTR_STACKADDR): Define
to 200112L for Cygwin.

13 years ago * cygwin.din (pthread_attr_getguardsize): Export.
Corinna Vinschen [Sun, 15 May 2011 18:49:40 +0000 (18:49 +0000)]
* cygwin.din (pthread_attr_getguardsize): Export.
(pthread_attr_setguardsize): Export.
(pthread_attr_setstack): Export.
(pthread_attr_setstackaddr): Export.
* init.cc (dll_entry): Remove wow64_test_stack_marker.  Check for
unusual stack address by testing stack addresses from current TEB.
Check validity of _my_tls by testing if it's within the stack as
given in current TEB.
* miscfuncs.cc (struct thread_wrapper_arg): New structure used to
push all required information to thread_wrapper function.
(thread_wrapper): Wrapper function for actual thread function.
If an application stack has been given, change %ebp and %esp so that
the thread function runs on that stack.  If the thread has been created
by CygwinCreateThread, set up the POSIX guard pages if necessary.
(CygwinCreateThread): New function.
* miscfuncs.h (CygwinCreateThread): Declare.
* ntdll.h (struct _TEB): Define all members up to Peb.
* posix.sgml (std-susv4): Move pthread_attr_getguardsize,
pthread_attr_setguardsize and pthread_attr_setstack here.
(std-deprec): Add pthread_attr_setstackaddr.
* sysconf.cc (sca): Set _SC_THREAD_ATTR_STACKADDR to
_POSIX_THREAD_ATTR_STACKADDR.
* thread.cc (pthread::precreate): Copy pthread_attr stackaddr and
guardsize members.
(pthread::create): Call CygwinCreateThread.
(pthread_attr::pthread_attr): Initialize guardsize.
(pthread_attr_setstack): New function.
(pthread_attr_setstackaddr): New function.
(pthread_attr_setguardsize): New function.
(pthread_attr_getguardsize): New function.
(pthread_getattr_np): Copy attr.guardsize.
* thread.h (pthread_attr): Add member guardsize.
* include/pthread.h (pthread_attr_getguardsize): Declare.
(pthread_attr_setguardsize): Declare.
* include/cygwin/version.h: Bump API minor number.

13 years ago * include/winbase.h (STACK_SIZE_PARAM_IS_A_RESERVATION): Define.
Corinna Vinschen [Sun, 15 May 2011 16:40:48 +0000 (16:40 +0000)]
* include/winbase.h (STACK_SIZE_PARAM_IS_A_RESERVATION): Define.

13 years ago * fhandler_process.cc (struct heap_info::heap): Convert base to
Corinna Vinschen [Fri, 13 May 2011 06:50:20 +0000 (06:50 +0000)]
* fhandler_process.cc (struct heap_info::heap): Convert base to
uintptr_t.  Add heap_id, end, flags members.
(heap_info::heap_vm_chunks): Rename from heaps.
(heap_info::heap_info): Rearrange using RtlQueryProcessDebugInformation
to get information of heap virtual memory blocks.  Store heap id and
flags, as well as end address of each block.
(heap_info::fill_if_match): Check incoming base address against full
address range of heap chunks.  Convert flag values in extra heap
information.
(format_process_maps): Change order so that heap check is done before
MEM_MAPPED check since there are shareable heaps.
* ntdll.h (PDI_HEAP_BLOCKS): Define.
(HEAP_FLAG_NOSERIALIZE): Define.
(HEAP_FLAG_GROWABLE): Define.
(HEAP_FLAG_EXCEPTIONS): Define.
(HEAP_FLAG_NONDEFAULT): Define.
(HEAP_FLAG_SHAREABLE): Define.
(HEAP_FLAG_EXECUTABLE): Define.
(HEAP_FLAG_DEBUGGED): Define.
(struct _DEBUG_HEAP_ARRAY): Define.
(struct _DEBUG_HEAP_BLOCK): Define.

13 years ago Based on newlib patch to strptime by Peter Rosin <peda@lysator.liu.se>:
Corinna Vinschen [Thu, 12 May 2011 13:44:54 +0000 (13:44 +0000)]
Based on newlib patch to strptime by Peter Rosin <peda@lysator.liu.se>:
* libc/time/strptime.c (is_leap_year): New static function.
(first_day): Ditto.
(__strptime): Fill in tm_yday when all of tm_year, tm_mon and tm_mday
are updated. Fill in tm_mon, tm_mday and tm_wday when both of tm_year
and tm_yday are updated.

13 years ago * libc/time/strptime.c (strptime): Fill in tm_yday when all of tm_year,
Corinna Vinschen [Thu, 12 May 2011 13:41:22 +0000 (13:41 +0000)]
* libc/time/strptime.c (strptime): Fill in tm_yday when all of tm_year,
tm_mon and tm_mday are updated. Fill in tm_mon, tm_mday and tm_wday
when both of tm_year and tm_yday are updated.

13 years ago * libc/time/strptime.c (first_day): Actually return the wday
Corinna Vinschen [Thu, 12 May 2011 12:43:43 +0000 (12:43 +0000)]
* libc/time/strptime.c (first_day): Actually return the wday
of the first day of the year.

13 years ago* fhandler_proc.cc (format_proc_meminfo): Rewrite to use sysinfo().
Yaakov Selkowitz [Thu, 12 May 2011 11:13:02 +0000 (11:13 +0000)]
* fhandler_proc.cc (format_proc_meminfo): Rewrite to use sysinfo().
Support RAM and swap space larger than 4GB.
Remove output elements not found with modern Linux kernels.
(format_proc_swaps): Support paging files larger than 4GB.

13 years ago * autoload.cc: Remove useless comment.
Corinna Vinschen [Wed, 11 May 2011 13:33:17 +0000 (13:33 +0000)]
* autoload.cc: Remove useless comment.

13 years ago * autoload.cc (EnumProcessModules): Remove.
Corinna Vinschen [Wed, 11 May 2011 13:25:27 +0000 (13:25 +0000)]
* autoload.cc (EnumProcessModules): Remove.
* dlfcn.cc (dlopen): Make sure errno is set if an error occurs.
(dlsym): Rewrite using RtlQueryProcessDebugInformation instead of
EnumProcessModules.
* ntdll.h (struct _DEBUG_MODULE_ARRAY): Define.
(RtlCreateQueryDebugBuffer): Declare.
(RtlDestroyQueryDebugBuffer): Declare.
(RtlQueryProcessDebugInformation): Declare.

13 years ago * autoload.cc (GetModuleFileNameExW): Remove.
Corinna Vinschen [Wed, 11 May 2011 10:41:03 +0000 (10:41 +0000)]
* autoload.cc (GetModuleFileNameExW): Remove.
* autoload.cc (GetModuleInformation): Remove.

13 years ago * autoload.cc (QueryWorkingSet): Remove.
Corinna Vinschen [Wed, 11 May 2011 10:34:27 +0000 (10:34 +0000)]
* autoload.cc (QueryWorkingSet): Remove.

13 years ago * fhandler_process.cc (format_process_maps): Rework to report
Corinna Vinschen [Wed, 11 May 2011 10:31:22 +0000 (10:31 +0000)]
* fhandler_process.cc (format_process_maps): Rework to report
all mapped address space in a process (committed or reserved),
identifying the nature of the mapping (mapped file/image, heap,
shared memory) when possible.
(dos_drive_mappings): New helper classes.
(heap_info): Ditto.
* ntdll.h (struct _MEMORY_SECTION_NAME): Define.

13 years ago * autoload.cc (GetProcessMemoryInfo): Remove.
Corinna Vinschen [Wed, 11 May 2011 09:07:20 +0000 (09:07 +0000)]
* autoload.cc (GetProcessMemoryInfo): Remove.
* resource.cc (fill_rusage): Call NtQueryInformationProcess rather than
GetProcessMemoryInfo to drop a psapi dependency.

13 years ago * fhandler_socket.cc (get_inet_addr): Rearrange for better readability.
Corinna Vinschen [Wed, 11 May 2011 08:20:17 +0000 (08:20 +0000)]
* fhandler_socket.cc (get_inet_addr): Rearrange for better readability.
Make waiting loop interruptible and cancelable.  Check for SYSTEM DOS
flag before reading the file.  Change return value to return 0 on
success, SOCKET_ERROR on failure.
(fhandler_socket::bind): Only set R/O DOS flag on filesystems not
supporting ACLs.
(fhandler_socket::connect): Accommodate changed return values from
get_inet_addr.  Use SOCKET_ERROR instead of -1.
(fhandler_socket::sendto): Accommodate changed return values from
get_inet_addr.
* syslog.cc (connect_syslogd): Ditto.

13 years ago * security.cc (check_registry_access): Handle missing
Christian Franke [Tue, 10 May 2011 17:19:37 +0000 (17:19 +0000)]
* security.cc (check_registry_access): Handle missing
security descriptor of HKEY_PERFORMANCE_DATA.

13 years ago * lc_msg.h: Regenerate.
Corinna Vinschen [Tue, 10 May 2011 16:43:34 +0000 (16:43 +0000)]
* lc_msg.h: Regenerate.

13 years ago * libc/locale/lmessages.c (_C_messages_locale): Add missing comma.
Corinna Vinschen [Tue, 10 May 2011 16:37:14 +0000 (16:37 +0000)]
* libc/locale/lmessages.c (_C_messages_locale): Add missing comma.

13 years ago * fhandler_proc.cc (format_proc_uptime): Don't call GetSystemInfo.
Corinna Vinschen [Tue, 10 May 2011 15:39:02 +0000 (15:39 +0000)]
* fhandler_proc.cc (format_proc_uptime): Don't call GetSystemInfo.
Fetch CPU count from wincap.
(format_proc_stat): Ditto.
* globals.cc (system_info): Move to wincap.
* heap.cc (heap_init): Fetch page size from wincap.
* syscalls.cc (getpagesize): Fetch allocation granularity from wincap.
(getsystempagesize): Fetch page size from wincap.
* wincap.cc (wincap_2003): Default is_server to false.
(wincapc::init): Call GetSystemInfo here.  Always set is_server value.
* wincap.h (class wincapc): Add system_info as private member.
(wincapc::cpu_count): New public method.
(wincapc::page_size): Ditto.
(wincapc::allocation_granularity): Ditto.

13 years ago * cygwinenv.sgml: Move "forkchunk:xxx" to the removed options section.
Corinna Vinschen [Tue, 10 May 2011 10:23:57 +0000 (10:23 +0000)]
* cygwinenv.sgml: Move "forkchunk:xxx" to the removed options section.
Change text accordingly.

13 years ago * environ.cc (set_chunksize): Remove.
Corinna Vinschen [Tue, 10 May 2011 10:17:30 +0000 (10:17 +0000)]
* environ.cc (set_chunksize): Remove.
(parse_thing): Remove forkchunk entry.
* fork.cc (child_copy): Drop handling external chunksize setting.
* wincap.cc: Througout, drop chunksize.
(wincapc::set_chunksize): Remove.
* wincap.h (struct wincaps): Drop chunksize and declaration of
set_chunksize.

13 years ago * Makefile.in: Don't override CC.
Corinna Vinschen [Tue, 10 May 2011 10:06:51 +0000 (10:06 +0000)]
* Makefile.in: Don't override CC.
* cyglsa.c: Don't include wchar.h.  Declare wcscpy and wcslen instead.
* cyglsa64.dll: Rebuild.

13 years ago * setup2.sgml (setup-env-ov): Make sure everybody knows that the
Corinna Vinschen [Tue, 10 May 2011 08:56:04 +0000 (08:56 +0000)]
* setup2.sgml (setup-env-ov): Make sure everybody knows that the
CYGWIN settings are just an example.

13 years ago2011-05-08 Doug Kwan <dougkwan@google.com>
Doug Kwan [Mon, 9 May 2011 17:56:47 +0000 (17:56 +0000)]
2011-05-08  Doug Kwan  <dougkwan@google.com>

Merge from gcc:

2011-05-08  Doug Kwan  <dougkwan@google.com>

* configure.ac: Propagate LDFLAGS_FOR_TARGET.
* configure: Regenerated.
* Makefile.tpl (LDFLAGS_FOR_TARGET): Use LDFLAGS_FOR_TARGET
value from configure.
* Makefile.in: Regenerated.

13 years ago2011-05-09 Paul Brook <paul@codesourcery.com>
Paul Brook [Mon, 9 May 2011 13:17:58 +0000 (13:17 +0000)]
2011-05-09  Paul Brook  <paul@codesourcery.com>

bfd/
* elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
elf32_tic6x_fake_sections): New functions.
(elf_backend_fake_sections): Define.

gas/
* config/tc-tic6x.c (streq): Define.
(tic6x_get_unwind): New.
(s_tic6x_cantunwind, s_tic6x_handlerdata, s_tic6x_endp,
s_tic6x_personalityindex, s_tic6x_personality): New functions.
(md_pseudo_table): Add "endp", "handlerdata", "personalityindex",
"personality" and "cantunwind".
(tic6x_regname_to_dw2regnum, tic6x_frame_initial_instructions,
tic6x_start_unwind_section, tic6x_unwind_frame_regs,
tic6x_pop_rts_offset_little, tic6x_pop_rts_offset_big,
tic6x_unwind_reg_from_dwarf, tic6x_flush_unwind_word,
tic6x_unwind_byte, tic6x_unwind_2byte, tic6x_unwind_uleb,
tic6x_cfi_startproc, output_exidx_entry, tic6x_output_unwinding,
tic6x_cfi_endproc): New.
* config/tc-tic6x.h (TIC6X_NUM_UNWIND_REGS): Define.
(tic6x_unwind_info): New.
(tic6x_segment_info_type): Add marked_pr_dependency, unwind and
text_unwind.
(TARGET_USE_CFIPOP, tc_regname_to_dw2regnum,
tc_cfi_frame_initial_instructions, DWARF2_DEFAULT_RETURN_COLUMN,
DWARF2_CIE_DATA_ALIGNMENT, tc_cfi_startproc, tc_cfi_endproc,
tc_cfi_section_name): Define.
* doc/c-tic6x.texi: Document new unwinding directives.
* dw2gencfi.c (tc_cfi_startproc, tc_cfi_endproc): Add default
definitions.
(cfi_insn_data, fde_entry, CFI_adjust_cfa_offset, CFI_return_column,
CFI_rel_offset, CFI_escape, CFI_signal_frame, CFI_val_encoded_addr):
Move to dw2gencfi.h.
(CFI_EMIT_target): Define.
(dot_cfi_sections): Check tc_cfi_section_name.
(dot_cfi_startproc): Use tc_cfi_startproc.
(dot_cfi_endproc): Use tc_cfi_endproc.
* dw2gencfi.h (cfi_insn_data, fde_entry, CFI_adjust_cfa_offset,
CFI_return_column, CFI_rel_offset, CFI_escape, CFI_signal_frame,
CFI_val_encoded_addr):  Move to here from dw2gencfi.c.

gas/testsuite:
* gas/tic6x/unwind-1.d: New test.
* gas/tic6x/unwind-1.s: New test.
* gas/tic6x/unwind-2.d: New test.
* gas/tic6x/unwind-2.s: New test.
* gas/tic6x/unwind-3.d: New test.
* gas/tic6x/unwind-3.s: New test.
* gas/tic6x/unwind-bad-1.d: New test.
* gas/tic6x/unwind-bad-1.s: New test.
* gas/tic6x/unwind-bad-1.l: New test.
* gas/tic6x/unwind-bad-2.d: New test.
* gas/tic6x/unwind-bad-2.s: New test.
* gas/tic6x/unwind-bad-2.l: New test.

include/
* elf/tic6x.h (ELF_STRING_C6000_unwind,
ELF_STRING_C6000_unwind_info, ELF_STRING_C6000_unwind_once,
ELF_STRING_C6000_unwind_info_once): Define.

13 years ago* new-features.sgml (ov-new1.7.10): Document clock_settime.
Yaakov Selkowitz [Mon, 9 May 2011 08:58:59 +0000 (08:58 +0000)]
* new-features.sgml (ov-new1.7.10): Document clock_settime.

13 years ago* times.cc (settimeofday): Add EFAULT handler.
Yaakov Selkowitz [Mon, 9 May 2011 08:57:46 +0000 (08:57 +0000)]
* times.cc (settimeofday): Add EFAULT handler.
Set errno to EINVAL if tv.tv_nsec is invalid, and to EPERM if
SetSystemTime fails.  Return -1 in case of failure, all for
compatibility with BSD and Linux.
(clock_settime): New function.
* cygwin.din (clock_settime): Export.
* posix.sgml (std-susv4): Add clock_settime.
Move clock_setres from here...
(std-deprec): ... to here.
(std-notes): Correct limitation of clock_setres to only CLOCK_REALTIME.
Add limitation of clock_settime to only CLOCK_REALTIME.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

13 years ago * registry.cc (get_registry_hive_path): Change system_printf to
Corinna Vinschen [Sat, 7 May 2011 18:56:39 +0000 (18:56 +0000)]
* registry.cc (get_registry_hive_path): Change system_printf to
debug_printf.
(load_registry_hive): Ditto.

13 years ago* fhandler.h (fhandler_base::close_with_arch): Make non-virtual.
Christopher Faylor [Fri, 6 May 2011 20:22:45 +0000 (20:22 +0000)]
* fhandler.h (fhandler_base::close_with_arch): Make non-virtual.
(fhandler_base::open_fs): Move closer to it's close counterpart.

13 years ago* fhandler.cc (fhandler_base::dup): Avoid duping a handle when an fhandler has
Christopher Faylor [Fri, 6 May 2011 20:12:20 +0000 (20:12 +0000)]
* fhandler.cc (fhandler_base::dup): Avoid duping a handle when an fhandler has
an archetype.
* fhandler_console.cc (fhandler_console::invisible_console): Move to the top.
(fhandler_console::set_close_on_exec): Don't set close-on-exec on handle since
it's an archetype and you don't know how many things could be using it.

13 years ago* fhandler.h (fhandler_dev_dsp): Cosmetic change.
Christopher Faylor [Fri, 6 May 2011 19:13:22 +0000 (19:13 +0000)]
* fhandler.h (fhandler_dev_dsp): Cosmetic change.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Put back
Sleep(10) for tty_master case.
* sigproc.cc (stopped_or_terminated): Don't consider a pid which has been
reaped to be terminated.

13 years ago* new-features.sgml (ov-new1.7.10): Document sysinfo.
Yaakov Selkowitz [Fri, 6 May 2011 18:55:02 +0000 (18:55 +0000)]
* new-features.sgml (ov-new1.7.10): Document sysinfo.

13 years ago* sysconf.cc (sysinfo): New function.
Yaakov Selkowitz [Fri, 6 May 2011 18:53:21 +0000 (18:53 +0000)]
* sysconf.cc (sysinfo): New function.
* cygwin.din (sysinfo): Export.
* posix.sgml (std-gnu): Add sysinfo.
* include/sys/sysinfo.h (struct sysinfo): Define.
(sysinfo): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

13 years ago * libc/minires-os-if.c (get_dns_info): Drop printing uninitialized
Corinna Vinschen [Fri, 6 May 2011 18:43:37 +0000 (18:43 +0000)]
* libc/minires-os-if.c (get_dns_info): Drop printing uninitialized
value of dwRetVal in debug output.

13 years ago * fhandler.h (fhandler_socket::read): Declare.
Corinna Vinschen [Fri, 6 May 2011 10:56:37 +0000 (10:56 +0000)]
* fhandler.h (fhandler_socket::read): Declare.
(fhandler_socket::write): Declare.
* fhandler_procsys.cc (fhandler_procsys::read): Add FIXME comment.
(fhandler_procsys::write): Ditto.
* fhandler_socket.cc (fhandler_socket::read): New method.
(fhandler_socket::write): New method.
* syscalls.cc: Rearrange order of read/write functions.
(read): Call fhandler read method directly instead of just readv.
(readv): Remove EINTR loop.  This is done in all affected fhandler's
now.
(write): Call fhandler write method directly instead of just writev.
Fix debug output.

13 years ago* cygheap.cc (cygheap::close_ctty): Close ctty via close_with_arch().
Christopher Faylor [Thu, 5 May 2011 22:30:53 +0000 (22:30 +0000)]
* cygheap.cc (cygheap::close_ctty): Close ctty via close_with_arch().
* debug.cc (close_handle): Call debugger on failure.
* devices.in (device::tty_to_real_device): Delete.
* devices.h (device::tty_to_real_device): Ditto.
* devices.cc: Regenerate.
* dtable.cc: Delete old ifdef'ed vfork code.
(dtable::release): Don't handle archetype here.
(dtable::init_std_file_from_handle): Consolidate console tests.  Generate
major/minor for tty ASAP.  Fix incorrect setting of DEV_TTYS* for serial.
(fh_alloc): New function derived from build_fh_pc.  Pass current tty when
building tty.
(build_pc_pc): Use fh_alloc to create.  Set name from fh->dev if appropriate.
Generate an archetype or point to one here.
(dtable::dup_worker): Deal with archetypes.  Rely on = operator copying whole
class rather than just fhandler_base.
(dtable::fixup_after_exec): Call close_with_arch to handle closing of fhandlers
with archetypes.
* fhandler.cc (fhandler_base::operator =): Call memcpy with fhandler's size()
rather than sizeof fhandler_base.
(fhandler_base::open_with_arch): New function.  Handles opening of fhandler's
with archetypes, dealing with usecounts, etc.
(fhandler_base::close_with_arch): Ditto for close.
* fhandler.h: Many changes for archetypes.
(fhandler_base::set_name): Set both normalized path and regular path.
(fhandler_base::open_with_arch): New function.
(fhandler_base::open_setup): Ditto.
(fhandler_base::use_archetype): Ditto.
(fhandler_base::_archetype_usecount): Ditto.
(fhandler_*::size): Ditto.
(fhandler_dev_tape::open): Remove virtual decoration.
(fhandler_console::use_archetype): New function.  Return true.
(fhandler_console::open_setup): New function.
(fhandler_console::dup): Delete.
(fhandler_tty_slave::fhandler_tty_slave): Redeclare to take an argument.
(fhandler_tty_slave::use_archetype): New function.  Return true.
(fhandler_tty_slave::cleanup): New function.
(fhandler_pty_master::use_archetype): New function.  Return true.
(fhandler_pty_master::cleanup): New function.
(fhandler_pty_master::is_tty_master): New function.  Return false.
(fhandler_tty_master::is_tty_master): New function.  Return true.
(fhandler_dev_dsp::fhandler_dev_dsp): New function.  Return true.
(report_tty_counts): Only report on archetype's usecount if there is one.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Remove handling of
setsid, set_ctty, set_flags, and manage_console_count.
(fhandler_console::open_setup): New function.  Implement functionality removed
from get_tty_stuff.
(fhandler_console::dup): Delete.
(fhandler_console::output_tcsetattr): Set errno on error.
(fhandler_console::fhandler_console): Set device early.
(fhandler_console::init): Use open_with_arch to open console handles.
(fhandler_console::fixup_after_fork_exec): Nuke most of the stuff for dealing
with console handles.
* fhandler_dsp.cc (fhandler_dev_dsp::open): Remove archetype handling.
(fhandler_dev_dsp::write): Ditto.
(fhandler_dev_dsp::read): Ditto.
(fhandler_dev_dsp::close): Ditto.
(fhandler_dev_dsp::dup): Ditto.
(fhandler_dev_dsp::ioctl): Ditto.
(fhandler_dev_dsp::fixup_after_fork): Ditto.
(fhandler_dev_dsp::fixup_after_exec): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Add a little
more debugging.
(fhandler_tty_common::__release_output_mutex): Ditto.
(fhandler_pty_master::process_slave_output): Ditto.  Don't do signal handling
or pthread_cancel handling in the tty master thread.
(process_output): Minor reorg.
(fhandler_tty_slave::fhandler_tty_slave): Set device based on new ntty
argument.
(fhandler_tty_slave::open): Remove archetype handling.  Move some processing
into open_setup().
(fhandler_tty_slave::open_setup): New function.
(fhandler_tty_slave::cleanup): New function.
(fhandler_tty_slave::close): Remove archetype handling.  Move some processing
into cleanup().
(fhandler_tty_slave::init): Rename argument from f to h.  Open device using
open_with_arch().  Remove archetype handling.
(fhandler_pty_master::dup): Ditto.
(fhandler_pty_master::open): Ditto.
(fhandler_pty_master::close): Ditto.  Move some handling to cleanup().
(fhandler_pty_master::cleanup): New function.
(fhandler_tty_master::init_console): Give unique name to captive console
fhandler.
* pinfo.cc (_pinfo::set_ctty): Rename argument from arch to fh.  Eliminate
archetype assumption.
* syscalls.cc (close_all_files): Use close_with_arch for closing.
(open): Use open_with_arch() rather than open().
(close): Use close_with_arch() rather than close().

13 years ago * pinfo.h (class push_process_state): New class to push a process state
Corinna Vinschen [Thu, 5 May 2011 19:43:04 +0000 (19:43 +0000)]
* pinfo.h (class push_process_state): New class to push a process state
flag temporarily into myself->process_state.
* fhandler_console.cc (fhandler_console::read): Add push_process_state
handler.
(fhandler_console::write): Call bg_check from here.  Add
push_process_state handler.
* fhandler_tty.cc (fhandler_tty_slave::write): Ditto.
(fhandler_tty_slave::read): Ditto.
(fhandler_pty_master::write): Ditto.
(fhandler_pty_master::read): Ditto.
* syscalls.cc (readv): Remove bg_check call and setting process state.
(writev): Ditto.

13 years ago * syscalls.cc (readv): Add myfault handler. Don't check repeatedly
Corinna Vinschen [Thu, 5 May 2011 18:46:38 +0000 (18:46 +0000)]
* syscalls.cc (readv): Add myfault handler.  Don't check repeatedly
open state of file handler.  Streamline loop.
(writev): Add myfault handler.

13 years ago* fhandler.cc (fhandler_base_overlapped::raw_read): Rename from
Christopher Faylor [Thu, 5 May 2011 17:44:42 +0000 (17:44 +0000)]
* fhandler.cc (fhandler_base_overlapped::raw_read): Rename from
read_overlapped.
(fhandler_base_overlapped::raw_e): Rename from write_overlapped.
* fhandler.h (fhandler_*::raw_read): Add reparm decoration.
(fhandler_*::raw_write): Ditto.
(fhandler_base_overlapped::raw_read): Rename from read_overlapped.
(fhandler_base_overlapped::raw_write): Rename from write_overlapped.
(fhandler_pipe::raw_read): Delete.
(fhandler_pipe::raw_write): Ditto.
(fhandler_mailslot::raw_read): Ditto.
* fhandler_fifo.cc (fhandler_fifo::raw_read): Reflect read_overlapped ->
raw_read rename.
(fhandler_fifo::raw_write): Ditto.
* fhandler_mailslot.cc (fhandler_mailslot::raw_read): Delete.
(fhandler_mailslot::raw_write): Reflect read_overlapped -> raw_read rename.
* pipe.cc (fhandler_pipe::raw_read): Delete.
(fhandler_pipe::raw_write): Ditto.

13 years ago* fork.cc (fork): Clear PID_REAPED.
Christopher Faylor [Thu, 5 May 2011 15:03:54 +0000 (15:03 +0000)]
* fork.cc (fork): Clear PID_REAPED.
* pinfo.cc (pinfo_init): Ditto.
(pinfo::init): Check for PID_REAPED.
* sigproc.cc (stopped_or_terminated): Ditto.

13 years ago* pinfo.cc (_pinfo::exists): Check for PID_REAPED.
Christopher Faylor [Thu, 5 May 2011 14:46:14 +0000 (14:46 +0000)]
* pinfo.cc (_pinfo::exists): Check for PID_REAPED.

13 years ago Fix typo.
Corinna Vinschen [Thu, 5 May 2011 13:46:32 +0000 (13:46 +0000)]
Fix typo.

13 years ago * fhandler_disk_file.cc (fhandler_disk_file::pread): Correctly return
Corinna Vinschen [Thu, 5 May 2011 13:45:06 +0000 (13:45 +0000)]
* fhandler_disk_file.cc (fhandler_disk_file::pread): Correctly return
with errno set to EBADF if file open mode is incorrect.
(fhandler_disk_file::pwrite): Ditto.

13 years ago * configure.ac (alpha*-dec-osf*, i[[3456789]]86-*-rdos*,
Joseph Myers [Thu, 5 May 2011 12:39:33 +0000 (12:39 +0000)]
* configure.ac (alpha*-dec-osf*, i[[3456789]]86-*-rdos*,
sh*-*-pe|mips*-*-pe|arm-wince-pe, sparc-*-sunos4*, *-*-aix*,
*-*-beos*, *-*-chorusos, *-*-dragonfly*, *-*-freebsd*, *-*-linux*
| *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu, *-*-lynxos*,
*-*-mingw*, *-*-netbsd*, *-*-netware*, *-*-tpf*, *-*-uclinux*,
*-*-vxworks*): Disable newlib and libgloss in separate case
statement.
(i[[3456789]]86-*-linux*): Move logic allowing newlib to be built
to separate case statement.
(*-*-chorusos, *-*-dragonfly*, *-*-freebsd*, *-*-netbsd*,
*-*-netware*, *-*-tpf*, *-*-uclinux*, *-*-vxworks*,
alpha*-dec-osf*, alpha*-*-linux*, am33_2.0-*-linux*, sh-*-linux*,
sh*-*-pe|mips*-*-pe|*arm-wince-pe, arm-*-coff, arm-*-elf* |
arm*-*-eabi*, arm*-*-linux-gnueabi, arm*-*-symbianelf*, avr-*-*,
bfin-*-*, cris-*-* | crisv32-*-*, frv-*-*, i[[3456789]]86-*-coff |
i[[3456789]]86-*-elf, i[[3456789]]86-w64-mingw*,
i[[3456789]]86-*-mingw*, x86_64-*-mingw*,
i[[3456789]]86-*-interix*, i[[3456789]]86-*-beos*,
i[[3456789]]86-*-rdos*, m32r-*-*,
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*, m68k-*-elf*, m68*-*-*
| fido-*-*, powerpc-*-aix*, powerpc-*-beos*, powerpc-*-eabi,
powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems*,
rs6000-*-lynxos*, rs6000-*-aix*, mips*-*-linux*, sparclet-*-aout*
| sparc86x-*-*, sparc-*-elf*, sparc64-*-elf*, sparclite-*-*,
sparc-*-sunos4*, sparc-*-solaris* | sparc64-*-solaris* |
sparcv9-*-solaris*, *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu |
*-*-kopensolaris*-gnu, *-*-lynxos*, *-*-*): Don't disable newlib
and libgloss in main case over targets.  Remove most empty cases
in main case over targets.
* configure: Regenerate.

13 years ago * fhandler.cc (is_at_eof): Drop static storage class. Drop err
Corinna Vinschen [Thu, 5 May 2011 09:05:04 +0000 (09:05 +0000)]
* fhandler.cc (is_at_eof): Drop static storage class.  Drop err
parameter since we don't change the Win32 error here anymore.
(fhandler_base::raw_read): Accommodate change to is_at_eof.

* fhandler_disk_file.cc (fhandler_disk_file::pread): In binary mode use
direct call to NtReadFile, rather than lseek/read.
(fhandler_disk_file::pwrite): In binary mode use direct call to
NtWriteFile, rather than lseek/write.

13 years ago * dcrt0.cc (dll_crt0_1): Reset locale to "C" even when dynamically
Corinna Vinschen [Thu, 5 May 2011 07:31:13 +0000 (07:31 +0000)]
* dcrt0.cc (dll_crt0_1): Reset locale to "C" even when dynamically
loaded.

13 years ago * posix.sgml (std-notimpl): Remove bsd_signal, setcontext, and
Corinna Vinschen [Thu, 5 May 2011 06:48:51 +0000 (06:48 +0000)]
* posix.sgml (std-notimpl): Remove bsd_signal, setcontext, and
swapcontext, marked obsolete in SUSv3 and not present in SUSv4.

13 years ago * fhandler_registry.cc (fhandler_registry::exists): Fix regression
Corinna Vinschen [Thu, 5 May 2011 06:45:21 +0000 (06:45 +0000)]
* fhandler_registry.cc (fhandler_registry::exists): Fix regression
in EACCES handling.
(fhandler_registry::open): Fix "%val" case.

13 years ago* signal.cc (_pinfo::kill): Return success on kill(0) only if pid exists or is
Christopher Faylor [Thu, 5 May 2011 00:31:22 +0000 (00:31 +0000)]
* signal.cc (_pinfo::kill): Return success on kill(0) only if pid exists or is
in PID_EXITED state.  Report pid 0 when pid does not exist rather than pid -1.
Make debug output reflect actual function call.
* sigproc.cc (stopped_or_terminated): Set process state to reaped when we've
finished waiting for it.
* include/sys/cygwin.h (PID_REAPED): New enum.

13 years ago* new-features.sgml (ov-new1.7.10): Document psiginfo, psignal,
Yaakov Selkowitz [Wed, 4 May 2011 22:18:16 +0000 (22:18 +0000)]
* new-features.sgml (ov-new1.7.10): Document psiginfo, psignal,
and sys_siglist.

13 years ago* cygwin.din (psiginfo): Export.
Yaakov Selkowitz [Wed, 4 May 2011 22:12:15 +0000 (22:12 +0000)]
* cygwin.din (psiginfo): Export.
(psignal): Export.
(sys_siglist): Export.
* posix.sgml (std-notimpl): Move psiginfo and psignal from here...
(std-susv4): ... to here.
(std-deprec): Add sys_siglist.
* strsig.cc (sys_siglist): New array.
(psiginfo): New function.
* include/cygwin/signal.h (sys_siglist): Declare.
(psiginfo): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

13 years ago * configure.ac: Remove code setting special library locations for
Joseph Myers [Wed, 4 May 2011 21:45:47 +0000 (21:45 +0000)]
* configure.ac: Remove code setting special library locations for
hppa*64*-*-hpux11*.  Remove code setting compiler for
sparc-sun-solaris2*.
* configure: Regenerate.

13 years ago* dll_list::detach (dll_list::detach): Avoid doing anything with detach during
Christopher Faylor [Wed, 4 May 2011 19:19:46 +0000 (19:19 +0000)]
* dll_list::detach (dll_list::detach): Avoid doing anything with detach during
a failing fork.

13 years ago* dll_init.cc (dll_global_dtors): Avoid calling destructors during failing
Christopher Faylor [Wed, 4 May 2011 16:02:45 +0000 (16:02 +0000)]
* dll_init.cc (dll_global_dtors): Avoid calling destructors during failing
fork().

13 years ago * fhandler.h (class fhandler_base): Remove uninterruptible_io status
Corinna Vinschen [Wed, 4 May 2011 13:06:10 +0000 (13:06 +0000)]
* fhandler.h (class fhandler_base): Remove uninterruptible_io status
flag.
(fhandler_base::ready_for_read): Remove declaration.
(fhandler_socket::ready_for_read): Ditto.
(fhandler_pipe::ready_for_read): Ditto.
(fhandler_tty_master::is_slow): Remove.
* fhandler_console.cc (fhandler_console::open): Drop setting
uninterruptible_io.
* fhandler_serial.cc (fhandler_serial::open): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Ditto.
(fhandler_tty_master::init_console): Ditto.
* pipe.cc (fhandler_pipe::fhandler_pipe): Ditto.
(fhandler_pipe::open): Ditto.
(_pipe): Ditto.
* select.cc (fhandler_pipe::ready_for_read): Remove.
(fhandler_base::ready_for_read): Remove.
* syscalls.cc (readv): Drop unneeded wait variable.  Remove entire test
which might lead to calling ready_for_read.  Remove now unused label
out.

13 years ago * fhandler.h (class fhandler_mailslot): Move down in file and change
Corinna Vinschen [Wed, 4 May 2011 12:56:12 +0000 (12:56 +0000)]
* fhandler.h (class fhandler_mailslot): Move down in file and change
parent class to fhandler_base_overlapped.  Remove declaration of
method write.  Add declaraiotns for raw_read and raw_write.
* fhandler_mailslot.cc (fhandler_mailslot::fhandler_mailslot): Call
fhandler_base_overlapped constructor.
(fhandler_mailslot::fstat): Call fhandler_base_overlapped::fstat.
(fhandler_mailslot::open): Drop FILE_SYNCHRONOUS_IO_NONALERT flag from
call to NtOpenFile.
(fhandler_mailslot::raw_read): New method.
(fhandler_mailslot::raw_write): Ditto.  Take over length algorithm from
former write method.
(fhandler_mailslot::write): Remove.
(fhandler_mailslot::ioctl): Call fhandler_base_overlapped::ioctl.

13 years ago * fhandler.h (fhandler_dev_tape::_lock): Add bool parameter.
Corinna Vinschen [Wed, 4 May 2011 12:23:00 +0000 (12:23 +0000)]
* fhandler.h (fhandler_dev_tape::_lock): Add bool parameter.
* fhandler_tape.cc (lock): Call _lock with false argument.
(_lock): Take bool cancelable parameter.  Handle O_NONBLOCK.
Make cancelable if cancelabe parameter is true.
(fhandler_dev_tape::raw_read): Call _lock with true argument.
(fhandler_dev_tape::raw_write): Ditto.

13 years ago * fhandler_dsp.cc (fhandler_dev_dsp::Audio): Add fh member.
Corinna Vinschen [Wed, 4 May 2011 11:41:22 +0000 (11:41 +0000)]
* fhandler_dsp.cc (fhandler_dev_dsp::Audio): Add fh member.
(fhandler_dev_dsp::Audio_out::Audio_out): Take pointer to encapsulating
fhandler_dev_dsp as parameter.
(fhandler_dev_dsp::Audio_in::Audio_in): Ditto.
(fhandler_dev_dsp::Audio::Audio): Take pointer to encapsulating
fhandler_dev_dsp as parameter and store in fh.
(fhandler_dev_dsp::Audio_out::write): Change return type to int and
return number of bytes written.  Return -1 if waitforspace returns false
and no bytes have been written so far.
(fhandler_dev_dsp::Audio_out::waitforspace): Change return type to bool.
Handle O_NONBLOCK.  Make waiting loop interruptible and cancelable.
Return false in any of these cases, otherwise true.
(fhandler_dev_dsp::Audio_in::read): Set returned nBytes to -1 if
waitfordata returns false and nothing has been read so far.
(fhandler_dev_dsp::Audio_in::waitfordata): Change return type to bool.
Handle O_NONBLOCK.  Make waiting loop interruptible and cancelable.
Return false in any of these cases, otherwise true.
(fhandler_dev_dsp::write): Call Audio_out constructor with this as
parameter.
(fhandler_dev_dsp::read): Call Audio_in constructor with this as
parameter.

13 years ago* libc/include/signal.h (psignal): Declare.
Yaakov Selkowitz [Wed, 4 May 2011 11:26:22 +0000 (11:26 +0000)]
* libc/include/signal.h (psignal): Declare.
* libc/sys/linux/psignal.c: Move from here...
* libc/signal/psignal.c: ... to here. Document.
* libc/sys/linux/Makefile.am (GENERAL_SOURCES): Move psignal.c from here...
* libc/signal/Makefile.am (LIB_SOURCES): ... to here.
(CHEWOUT_FILES): Add psignal.def.
* libc/sys/linux/Makefile.in: Regenerate.
* libc/signal/Makefile.in: Ditto.
* libc/signal/signal.tex: Add references to psignal.

13 years agoinclude/coff
Tristan Gingold [Wed, 4 May 2011 11:05:14 +0000 (11:05 +0000)]
include/coff
2011-05-04  Tristan Gingold  <gingold@adacore.com>

* rs6000.h (union external_auxent): Add x_ftype field.
* rs6k64.h: (struct external_auxent): Remap x_file field.

bfd/
2011-04-28  Tristan Gingold  <gingold@adacore.com>

* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
(bfd_xcoff_swap_aux_out): Ditto.
* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
(bfd_xcoff64_swap_aux_out): Ditto.

13 years ago * configure.ac: Separate libgloss_dir settings from general case
Joseph Myers [Wed, 4 May 2011 09:51:31 +0000 (09:51 +0000)]
* configure.ac: Separate libgloss_dir settings from general case
over targets.
* configure: Regenerate.

13 years ago * libc/locale/lmessages.h (__messages_load_locale): Declare. Remove
Corinna Vinschen [Wed, 4 May 2011 08:54:34 +0000 (08:54 +0000)]
* libc/locale/lmessages.h (__messages_load_locale): Declare.  Remove
accidental declaration of __numeric_load_locale.
* libc/locale/locale.c: Include timelocal.h to get declaration of
__time_load_locale.
(__set_locale_from_locale_alias): Fix return type.
(__locale_msgcharset): Avoid compiler warnings.
(_localeconv_r): Ditto.

13 years ago Cygwin-specific patch from Andy Koppe:
Corinna Vinschen [Wed, 4 May 2011 08:45:17 +0000 (08:45 +0000)]
Cygwin-specific patch from Andy Koppe:
* libc/locale/locale.c (current_categories): On Cygwin, set LC_CTYPE
to C.UTF-8 to match initial __wctomb and __mbtowc settings.
(lc_ctype_charset): On Cygwin, initialize to "UTF-8".
(loadlocale): Remove unused Cygwin-specifc code.

13 years ago2011-05-04 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Wed, 4 May 2011 06:53:38 +0000 (06:53 +0000)]
2011-05-04  Tristan Gingold  <gingold@adacore.com>

* rs6000.h (struct external_exceptab): New struct.
(EXCEPTSZ): New macro.
* rs6k64.h: (struct external_exceptab): New struct.
(EXCEPTSZ): New macro.

13 years ago* thread.h (pthread::static_cancel_self): Mark as noreturn.
Christopher Faylor [Wed, 4 May 2011 06:16:59 +0000 (06:16 +0000)]
* thread.h (pthread::static_cancel_self): Mark as noreturn.
(pthread::cancel_self): Ditto.
* thread.cc (pthread::cancel_self): Explicitly use pthread::exit to avoid a
"function returns" error.

13 years ago* pinfo.cc (pinfo::pinfo): Set procinfo to NULL to avoid potential cleanup of
Christopher Faylor [Wed, 4 May 2011 06:00:54 +0000 (06:00 +0000)]
* pinfo.cc (pinfo::pinfo): Set procinfo to NULL to avoid potential cleanup of
uninitialized garbage.  (Suggested by Ryan Johnson)

13 years ago * select.cc (cygwin_select): Make degenerate case cancelable.
Corinna Vinschen [Tue, 3 May 2011 15:58:52 +0000 (15:58 +0000)]
* select.cc (cygwin_select): Make degenerate case cancelable.
(select_stuff::destroy): New inline method to delete memory taken
by select_stuff.
(select_stuff::~select_stuff): Call destroy.
(select_stuff::wait): Add case to allow canceling select.
* select.h (select_stuff::destroy): Declare.
* thread.cc: Mark poll, pselect and poll as cancelable.

13 years ago * locale.cc (print_locale_with_codeset): Align printing of locale names
Corinna Vinschen [Tue, 3 May 2011 10:34:25 +0000 (10:34 +0000)]
* locale.cc (print_locale_with_codeset): Align printing of locale names
to POSIX.

13 years ago * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Make
Corinna Vinschen [Tue, 3 May 2011 10:11:19 +0000 (10:11 +0000)]
* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Make
cancelable.  Remove test for main thread, always add signal_arrived
to waited objects.

13 years ago2011-05-03 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 3 May 2011 09:21:05 +0000 (09:21 +0000)]
2011-05-03  Tristan Gingold  <gingold@adacore.com>

* rs6000.h (struct external_ldsym): Use E_SYMNMLEN instead of
SYMNMLEN.

13 years ago * fhandler_tty.cc (fhandler_tty_slave::read): Set WFMO timeout to 0 for
Corinna Vinschen [Tue, 3 May 2011 07:58:13 +0000 (07:58 +0000)]
* fhandler_tty.cc (fhandler_tty_slave::read): Set WFMO timeout to 0 for
nonblocking case.  Drop useless waiter variable.  Rewrite wait for
input_available_event to use a switch statement.  Handle timeout and
failure more gracefully.  Make restartable and cancelable.  Rewrite
wait for input_mutex to use WFMO and a switch statement.  Handle
timeout and failure more gracefully.  Make restartable and cancelable.

13 years ago* new-features.sgml (ov-new1.7.10): Document new pthread APIs.
Yaakov Selkowitz [Tue, 3 May 2011 04:09:52 +0000 (04:09 +0000)]
* new-features.sgml (ov-new1.7.10): Document new pthread APIs.

This page took 0.071429 seconds and 5 git commands to generate.