(init_cygheap): Inherit locale field via mini_cygheap.
* cygheap.cc (cygheap_at_start): Define new variable.
(cygheap): Initialize as cygheap_at_start so that locale information is always
available.
(cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
* shared_info.h (memory_init): Accommodate argument change.
* memory.cc (memory_init): Accept an argument indicating whether cygheap should
be initialized or not.
* dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
(child_info_spawn::handle_spawn): Ditto.
(dll_crt0_0): Pass true to memory_init when not forking or execing.
* cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
* dll_init.h (dll): Remove unused namelen field.
(dll_list::load_after_fork): Accommodate change in arguments.
* dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin heap.
(dll_list::detach): Free dll information from the cygwin heap.
(dll_list::load_after_fork): Use dll information in the cygwin heap directly
rather than querying parent.
* fork.cc (frok::first_dll): Delete.
(frok::child): Don't report on first_dll. Don't pass it to load_on_fork.
(frok::parent): Don't set first_dll.
(fork): Ditto.
object. Explain why. Drop call to GetSystemInfo, rather call
getpagesize to get allocation granularity. Only align to allocation
granularity under WOW64. Use roundup2 to align.
(dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
* dll_init.cc: Fix formatting.
(dll_list::alloc): Only allocate as much memory for struct dll as
necessary for given DLL name.
(dll_list::load_after_fork): Only read a single page of parent memory.
Only read more if namelen indicates that it's necessary.
(set_clipboard): Add basic error checking. Set errno here. Per MSDN,
don't call GlobalFree on data block transferred to clipboard.
(fhandler_dev_clipboard::write): Drop setting errno after call to
set_clipboard.
(fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
* libc/locale/locale.c (lc_ctype_cjk_lang): New static int.
(loadlocale): In case of setting LC_CTYPE, set lc_ctype_cjk_lang
to 1 if the language is "jp", "ko", or "zh", to 0 otherwise.
(__locale_cjk_lang): New function.
* libc/string/local.h (__locale_cjk_lang): Declare.
* libc/string/wcwidth.c: Fix comments.
(__wcwidth): Handle CJK Ambiguous Width characters according
to setting returned by __locale_cjk_lang.
of the change to sys_cp_mbstowcs from 2009-05-30.
(sys_cp_mbstowcs): Slightly reformat. Fix comment to accommodate
change to sys_cp_wcstombs. Don't write to *ptr if dst is NULL.
(__jp2uc): Change the scope to static function.
* libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__.
* libc/string/local.h (_jp2uc): Include ../ctype/local.h.
2009-05-18 Jon Beniston <jon@beniston.com>
* MAINTAINERS: Add lm32 target.
* Makefile.in: Add lm32 dependencies.
* NEWS: Indicate lm32 is a new target.
* configure.tgt: Add lm32 targets.
* lm32-tdep.c: New file.
gdb/testsuite
2009-05-18 Jon Beniston <jon@beniston.com>
* gdb.asm/asm-source.exp: Add lm32 target.
include/gdb/
2009-05-18 Jon Beniston <jon@beniston.com>
* sim-lm32.h: New file.
sim/
2009-05-18 Jon Beniston <jon@beniston.com>
* MAINTAINERS: Add Jon Beniston as maintainer of lm32 sim.
* configure.ac: Add lm32 target.
* lm32: New directory.
sim/common
2009-05-18 Jon Beniston <jon@beniston.com>
* gennltvals.sh: Add lm32 target.
* nltvals.def: Add lm32 syscall definitions.
sim/lm32/
2009-05-18 Jon Beniston <jon@beniston.com>
* Makefile.in: New file.
* arch.c: New file.
* arch.h: New file.
* config.in: New file.
* configure: New file.
* configure.ac: New file.
* cpu.c: New file.
* cpu.h: New file.
* cpuall.h: New file.
* decode.c: New file.
* decode.h: New file.
* dv-lm32cpu.c: New file.
* dv-lm32timer.c: New file.
* dv-lm32uart.c: New file.
* lm32.c: New file.
* lm32-sim.h: New file.
* mloop.in: New file.
* model.c: New file.
* sem.c: New file.
* sem-switch.c: New file.
* sim-if.c: New file.
* sim-main.c: New file.
* tconfig.in: New file.
* traps.c: New file.
* user.c: New file.
* configure.in: Add configuration test for long double type existing
and set flag _HAVE_LONG_DOUBLE if true. Fix INIT_ARRAY (.init_array)
and _LDBL_EQ_DBL tests to not link so that will work with
cross-compilers.
* configure: Regenerated.
* Makefile.in: Ditto.
* newlib.hin: Add _HAVE_LONG_DOUBLE flag.
* libc/include/math.h: Change non-builtin defines for HUGE_VAL,
HUGE_VALF, and HUGE_VALL to be constant expressions. Add definitions
for the non-builtin case for INFINITY and NAN. Gate HUGE_VALL and
union __ldmath definitions with (new) _HAVE_LONG_DOUBLE.
*libm/common/s_infconst.c: Change definitions to use values from
float.h instead of non-so-portable integer forms. Mark as being
deprecated (because now removed from math.h, are not used anywhere
in Newlib, itself).