starting.
* child_info.h (init_child_info): Remove pid argument from declaration.
* cygheap.h (init_cygheap::pid): New element.
* dcrt0.cc (dll_crt0_0): Eliminate handling of now-noexistent cygpid parameter
in child_info struct. Set forkee to 'true' rather than cygpid since the pid
value was never used.
(dll_crt0_1): Ditto.
(_dll_crt0): Ditto.
* fork.cc (fork_child): Don't wait for sigthread. This is handled in the fork
call now.
(fork_parent): Remove obsolete pid argument from init_child_info call. Don't
do anything special with cygpid when DEBUGGING.
(fork): Delay all signals during fork.
(fork_init): Don't do anything special when DEBUGGING.
* pinfo.cc (set_myself): Remove pid parameter. Use new pid field in cygheap.
(pinfo_init): Don't pass pid argument to set_myself.
* sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as
sendsig.
(init_child_info): Eliminate handling of pid.
(wait_sig): Implement method to temporarily hold off sending signals.
* sigproc.h (__SIGHOLD): New enum.
(__SIGNOHOLD): Ditto.
* spawn.cc (spawn_guts): Remove obsolete pid argument from init_child_info
call.
* cygheap.h (cwdstuff::drive_length): New member.
(cwdstuff::get_drive): New method.
* path.cc (normalize_win32_path): Simplify by using cwdstuff::get_drive.
(mount_info::conv_to_win32_path): Use cwdstuff::get_drive as default for /.
(cwdstuff::set): Initialize drive_length.
indicate that it is "special".
* thread.cc (pthread::exit): If __sdidinit is < 0, it was never really
initialized so reset it to 0 before calling _reclaim_reent.
* autoload.cc (NtQueryInformationFile): Return nonzero on error.
* ntdll.h (FILE_PIPE_LOCAL_INFORMATION): Add.
(NtQueryInformationFile): Fix types for last two arguments.
* pipe.cc: Include stdlib.h, limits.h, and ntdll.h.
(create_selectable_pipe): New function to create a pipe that can be used with
NtQueryInformationFile for select.
(fhandler_pipe::create): Call create_selectable_pipe instead of CreatePipe.
(pipe): Use DEFAULT_PIPEBUFSIZE as argument to create_pipe.
* select.cc: Include limits.h and ntdll.h.
(peek_pipe): Add select_printf output. Call NtQueryInformationFile to
implement select for write on pipes.
(fhandler_pipe::select_read): Reorder field assignments to be consistent with
fhandler_pipe::select_write.
(fhandler_pipe::select_write): Initialize startup, verify, cleanup, and
write_ready fields for select_record.
(fhandler_pipe::select_except): Tweak indentation to be consistent with
fhandler_pipe::select_write.
(fhandler_dev_dsp::open_count): Delete.
(fhandler_dev_dsp::close_audio_in): New method declaration.
(fhandler_dev_dsp::close_audio_in): Ditto.
* fhandler_dsp.cc: Add and edit debug_printf throughout.
(fhandler_dev_dsp::Audio::denyAccess): Delete.
(fhandler_dev_dsp::Audio::fork_fixup): Ditto.
(fhandler_dev_dsp::Audio::getOwner): Ditto.
(fhandler_dev_dsp::Audio::clearOwner): Ditto.
(fhandler_dev_dsp::Audio::owner_): Ditto.
(fhandler_dev_dsp::Audio::setformat): Ditto, rename to setconvert.
(fhandler_dev_dsp::Audio::lock): Ditto, move to queue.
(fhandler_dev_dsp::Audio::unlock): Ditto.
(fhandler_dev_dsp::Audio::lock_): Ditto.
(fhandler_dev_dsp::Audio::bufferIndex_): New member, from Audio_out
and Audio_in.
(fhandler_dev_dsp::Audio::pHdr_): Ditto.
(fhandler_dev_dsp::Audio::wavehdr_): Ditto.
(fhandler_dev_dsp::Audio::bigwavebuffer_): ditto.
(fhandler_dev_dsp::Audio::Qisr2app_): Ditto.
(fhandler_dev_dsp::Audio::setconvert): New method, from old setformat.
(fhandler_dev_dsp::Audio::queue::lock): New method.
(fhandler_dev_dsp::Audio::queue::unlock): Ditto.
(fhandler_dev_dsp::Audio::queue::dellock): Ditto.
(fhandler_dev_dsp::Audio::queue::isvalid): Ditto.
(fhandler_dev_dsp::Audio::queue::lock_): New member.
(fhandler_dev_dsp::Audio::queue::depth1_): Delete.
(fhandler_dev_dsp::Audio_out::fork_fixup): New method.
(fhandler_dev_dsp::Audio_out::isvalid): New method.
(fhandler_dev_dsp::Audio_out::start): Remove arguments.
(fhandler_dev_dsp::Audio_out::parsewav): Change arguments and set
internal state.
(fhandler_dev_dsp::Audio_out::emptyblocks): Delete.
(fhandler_dev_dsp::Audio_out::Qapp2app_): Ditto.
(fhandler_dev_dsp::Audio_out::Qisr2app_): Ditto, move to Audio.
(fhandler_dev_dsp::Audio_out::bufferIndex_): Ditto.
(fhandler_dev_dsp::Audio_out::pHdr_): Ditto.
(fhandler_dev_dsp::Audio_out::wavehdr_): Ditto.
(fhandler_dev_dsp::Audio_out::bigwavefuffer_): Ditto.
(fhandler_dev_dsp::Audio_out::freq_): New member.
(fhandler_dev_dsp::Audio_out::bits_): New member.
(fhandler_dev_dsp::Audio_out::channels_): New member.
(fhandler_dev_dsp::Audio_in::fork_fixup): New method.
(fhandler_dev_dsp::Audio_in::isvalid): New method.
(fhandler_dev_dsp::Audio_in::Qapp2app_): Delete.
(fhandler_dev_dsp::Audio_in::Qisr2app_): Ditto, move to Audio.
(fhandler_dev_dsp::Audio_in::bufferIndex_): Ditto.
(fhandler_dev_dsp::Audio_in::pHdr_): Ditto.
(fhandler_dev_dsp::Audio_in::wavehdr_): Ditto.
(fhandler_dev_dsp::Audio_in::bigwavefuffer_): Ditto.
(fhandler_dev_dsp::Audio::queue::queue): Simplify.
(fhandler_dev_dsp::Audio::queue::send): Use lock.
(fhandler_dev_dsp::Audio::queue::query): Do not use depth1_.
(fhandler_dev_dsp::Audio::queue::recv): Ditto.
(fhandler_dev_dsp::Audio::Audio): Adapt to new class members.
(fhandler_dev_dsp::Audio::~Audio): Ditto
(fhandler_dev_dsp::Audio_out::start): Reorganize.
(fhandler_dev_dsp::Audio_out::stop): Simplify.
(fhandler_dev_dsp::Audio_out::init): Reset the queue and clear flag.
(fhandler_dev_dsp::Audio_out::write): Reorganize to allocate audio_out.
(fhandler_dev_dsp::Audio_out::buf_info): Use appropriate block size.
(fhandler_dev_dsp::Audio_out::callback_sampledone): Do not use lock.
(fhandler_dev_dsp::Audio_out::waitforspace): Simplify.
(fhandler_dev_dsp::Audio_out::waitforallsent):Ditto.
(fhandler_dev_dsp::Audio_out::sendcurrent): Reorganize.
Clear flag before requeuing.
(fhandler_dev_dsp::Audio_out::parsewav):
(fhandler_dev_dsp::Audio_in::start): Reorganize.
(fhandler_dev_dsp::Audio_in::stop): Simplify.
(fhandler_dev_dsp::Audio_in::queueblock): Ditto.
Requeue header in case of error.
(fhandler_dev_dsp::Audio_in::init): Reset the queue and clear flag.
(fhandler_dev_dsp::Audio_in::waitfordata): Simplify.
Do not UnprepareHeader if the flag is zero.
(fhandler_dev_dsp::Audio_in::buf_info): Ditto.
(fhandler_dev_dsp::Audio_in::callback_blockfull): Do not use lock.
(fhandler_dev_dsp::open_count): Delete.
(fhandler_dev_dsp::open): Only check existence, do not allocate
anything. Set flags appropriately. Create archetype.
(fhandler_dev_dsp::write): Call archetype as needed. Create audio_out.
(fhandler_dev_dsp::read): Call archetype as needed. Create audio_in.
(fhandler_dev_dsp::close): Call archetype as needed.
Call close_audio_in and close_audio_out.
(fhandler_dev_dsp::close_audio_in): New function.
(fhandler_dev_dsp::close_audio_out): New function.
(fhandler_dev_dsp::dup): Use archetypes.
(fhandler_dev_dsp::ioctl): Call archetype as needed. Reorganize for
new structures.
(fhandler_dev_dsp::fixup_after_fork): Call archetype as needed.
(fhandler_dev_dsp::fixup_after_exec): Call archetype as needed.
Clear audio_in and audio_out.
(forkrectest): Expect child success.
(forkplaytest): Ditto.
(syncwithchild): Output the child status and the desired value.
(sinegenw): Reduce volume of the beep.
(sinegenb): Ditto.
(dup_test): New test.
* mingwex/fseeko64.c: Move.
* mingwex/ftello64.c: Move.
* mingwex/lseek64.c: Move.
* mingwex/stdio/fopen64.c: To here.
* mingwex/stdio/fseeko64.c: To here.
* mingwex/stdio/ftello64.c: To here.
* mingwex/stdio/lseek64.c: To here.
White space cleanup in ChangeLog
* pinfo.cc (pinfo::init): Don't consider MapViewOfFileEx error to be fatal if
exiting.
* pinfo.h (pinfo::init): Eliminate default argument and supply the argument in
the one case that needed it.
(IsWow64Process): Add.
* init.cc (respawn_wow64_process): New function.
(dll_entry): If process has been started from a 64 bit
process, call respawn_wow64_process.
* uname.cc (uname): On 64 bit systems, use GetNativeSystemInfo.
Show actual CPU type.
(__MINGW_ATTR_NORETURN): New define.
(__MINGW_ATTR_CONST): New define.
(__MINGW_ATTR_MALLOC): New define.
(__MINGW_ATTR_PURE): New define.
(_CRTIMP, __cdecl, __stdcall, __UNUSED_PARAM): Ansi-fy
expansions.