This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
win32: fix argumentless sleep()
authorTomasz Konojacki <me@xenu.pl>
Sun, 15 Jul 2018 00:33:16 +0000 (02:33 +0200)
committerTony Cook <tony@develop-help.com>
Wed, 1 Aug 2018 06:42:30 +0000 (16:42 +1000)
commitbbc9927bf24edbd6398f6decb015f1b9369455a0
tree86f9b8cc90be6d19f0a7efa7605c928895e4e22e
parent3d5e9c119db6b727684fe75dfcfe5831c4351bec
win32: fix argumentless sleep()

Before this commit, pause() was implemented as a macro calling
win32_sleep((32767L << 16) + 32767), which was causing the following
problems with argumentless sleep():

- it was sleeping for 4262198 seconds (~50 days) instead of forever
- it was triggering "sleep(2147450879) too large" warning

This commit implements pause() as a proper function which calls
win32_msgwait() with an INFINITE timeout.

[perl #133376]
makedef.pl
win32/perlhost.h
win32/win32.c
win32/win32iop.h