for better readability. Change function names for better
understanding.
(MAP_SET): Accomodate name change from map_map_ to page_map_.
(MAP_CLR): Ditto.
(MAP_ISSET): Ditto.
(mmap_record::page_map_): Rename from page_map_.
(mmap_record::get_map): Remove.
(mmap_record::alloc_page_map): Rename from alloc_map. Return bool
indicating success of cygheap memory allocation.
(mmap_record::free_page_map): Rename from free_map.
(mmap_record::fixup_page_map): Rename from fixup_map.
(mmap_record::find_unused_pages): Rename from find_empty.
(mmap_record::map_pages): Rename from map_map.
(mmap_record::unmap_pages): Rename from unmap_map.
(class list): Make all class members private.
(list::list): Remove.
(list::~list): Remove.
(list::get_fd): New attribute reader.
(list::get_hash): Ditto.
(list::get_record): Ditto.
(list::add_record): Manage all allocation for mmap_records. Check
for failed memory allocation and return NULL if so.
(list::set): New function.
(list::del_record): Rename from erase. Return true if last mmap_record
has been deleted, false otherwise. Check for legal incoming index
value.
(list::erase): Remove erase/0.
(list::search_record): Rename from match.
(map::map): Remove.
(map::~map): Remove.
(map::add_list): Manage all allocation for lists. Check for failed
memory allocation and return NULL if so.
(map::get_list): New method.
(map::del_list): Rename from erase. Check for legal incoming index
value.
(mmap64): Check for failed mmap_record memory allocation. Return
with MAP_FAILED and errno set to ENOMEM if so.
(munmap): Rearrange loop using new list and mmap_record accessor
functions. Rename loop index variables for better understanding.
Check if list can be deleted after last mmap_record in it has been
deleted.
(msync): Rearrange loop using new list and mmap_record accessor
functions. Rename loop index variables for better understanding.
(fixup_mmaps_after_fork): Ditto.
become unmasked.
* sigproc.cc (pending_signals): Flip back to a global.
(wait_sig): Don't set pending signals when there is an armed semaphore or
signal is blocked.
* shared.cc (shared_info::initialize): Add a username parameter for user-mode
mounts. Reorganize to try to avoid startup race.
(memory_init): Move some stuff into shared_info::initialize.
* shared_info.h (shared_info::initialize): Change declaration.
(CURR_SHARED_MAGIC): Update.
* cygheap.h (cygheap_types): Add HEAP_SIGS.
* exceptions.cc (signal_fixup_after_exec): Remove from this file.
* pinfo.h (pinfo::getsig): Just return global_sigs array.
(pinfo::sigs): Delete.
* sigproc.cc (signal_fixup_after_exec): Move it here.
(global_sigs): New global array, moved from pinfo structure.
(sigalloc): New function. Allocate global sigaction array here.
(proc_subproc): Remove copysigs call. It's automatic now.
* include/sys/cygwin.h (PID_NOCLDSTOP): New value.
* signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate.
* sigproc.h (sigalloc): Declare.
* fnmatch.c (fnmatch): Use C90 parameters.
(rangematch): Ditto.
* fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a compiler
warning.
(dup_addr_list): Delete.
(dup_char_list): Delete.
(free_hostent_ptr): Delete.
(free_protoent_ptr): Delete.
(free_servent_ptr): Delete.
(DWORD_round): New function.
(strlen_round): New function. Returns strlen rounded up to word size.
(dup_ent): New, generic function to duplicate a {host,proto,serv}ent structure.
(gen_ent): New macro. Generates a generic dup_{host,proto,serv}ent_ptr
function.
(cygwin_getservbyname): Remove call to free_servent_ptr, pass servent_buf to
dup_servent_ptr.
(cygwin_getservbyport): Ditto.
(cygwin_gethostbyname): Ditto for hostent.
(cygwin_gethostbyaddr): Ditto.
(cygwin_getprotobyname): Ditto for protoent.
(cygwin_getprotobynumber): Ditto.
* configure.in: Fill in MALLOC_OFILES with either debugging or regular malloc.
* configure: Regenerate.
* dlmalloc.c: Make various fruitless changes to attempt to get to work.
* dlmalloc.h: Ditto.
* malloc.cc (free): Check malloc pool when debugging.
* path.cc (win32_device_name): Eliminate compiler warning.
* sigproc.cc (sig_dispatch_pending): Remove use of was_pending. Let
thisframe.call_signal_handler decide if handler should be called rather than
using bogus was_pending check.
* exceptions.cc (interrupt_setup): Remove accidentally checked in debugging
code.
* heap.cc (sbrk): Save rounded addess in user_heap_max.
* sigproc.cc (checkstate): Make regparm.
(getevent): Change parameters in declaration, rename from getsem, make regparm.
(sig_send): Recognize that nosync is now an event. Remove some old cruft from
previous interrupt anywhere signal handler.
(getevent): Change parameters in definition, rename from getsem. Allocate
event rather than semaphore.
(wait_sig): Treat sigcatch_nosync as an event.
* sigproc.cc (checkstate): Make regparm.
(getevent): Change parameters in declaration, rename from getsem, make regparm.
(sig_send): Recognize that nosync is now an event. Remove some old cruft from
previous interrupt anywhere signal handler.
(getevent): Change parameters in definition, rename from getsem. Allocate
event rather than semaphore.
(wait_sig): Treat sigcatch_nosync as an event.
* cygthread.h (cygthread::main_thread_id): Make public.
* exceptions.cc (setup_handler): Remove unneeded priority stuff. Rename label
to reflect what it does. Add debugging for idiotic Windows NT problem. Change
debugging output to include signal number.
* miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread function
to give time slice to other threads.
* wincap.cc: Properly define have_switch_to_thread throughout.
* wincap.h (wincap::switch_to_thread): New element.
2003-08-23 Phil Edwards <pme@gcc.gnu.org>
* configure.in: Use newline instead of semicolon when assuming
shell arguments in a for loop.
* configure: Regenerated.
* libc/include/stdio.h: Allow the io64 function prototypes for
Cygwin when compiling newlib.
* libc/include/sys/stat.h[__CYGWIN__]: Define stat64 as __stat64
to expose the Cygwin struct __stat64 type.
* libc/stdio64/fseeko64.c: Use _fstat64_r and pass a struct stat64
pointer.
* libc/stdio64/tmpfile64.c(_tmpfile64_r): Call _fopen64_r.
* lib/test.c: Add vfw.h to includes.
* include/mmsystem.h: Add #ifndef guard to definition of
mmioFOURCC macro.
* include/vfw.h: Protect __OBJC__ from COM declarations.
2003-08-26 Filip Navara <xnavara@volny.cz>
* include/vfw.h: New file.