[PHP-DEV] PHP 4.0 Bug #8728: Patch: usleep() working on win32 platforms From: christophe <email protected>
Date: 01/15/01

From: christophe <email protected>
Operating system: Any Windows OS
PHP version: 4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description: Patch: usleep() working on win32 platforms

usleep exists on Win32 as the Sleep command (it takes a millisecond value as parameter) so here is the patch for making the usleep() php function to work on win32 platforms:

in main/win95nt.h, line 27:

#define php_sleep(t) Sleep(t*1000)

add the following line so it looks like:
#define php_sleep(t) Sleep(t*1000)
#define usleep(t) Sleep(t)

and in config.w32.h, line 93:

/* Define if you have the usleep function. */
#undef HAVE_USLEEP

change it to:

/* Define if you have the usleep function. */
#define HAVE_USLEEP 1

-Christophe Thibault
Nullsoft (www.nullsoft.com/www.winamp.com)

-- 
Edit Bug report at: http://bugs.php.net/?id=8728&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>