From: Edin Kadribasic Date: Sun, 23 Jun 2002 23:22:33 +0000 (+0000) Subject: Allow dynamically compiled extensions to use gettimeofday() on win32. X-Git-Tag: php-4.3.0dev_zend2_alpha2~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2183565321121e54fa4119b8be5f8173d1448aa7;p=php Allow dynamically compiled extensions to use gettimeofday() on win32. --- diff --git a/win32/time.c b/win32/time.c index 710307574d..9f07fab862 100644 --- a/win32/time.c +++ b/win32/time.c @@ -44,7 +44,7 @@ __int64 ff; -int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info) +PHPAPI int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info) { static struct timeval starttime = {0, 0}; @@ -186,7 +186,7 @@ LPTIMECALLBACK setitimer_timeout(UINT uTimerID, UINT info, DWORD dwUser, DWORD d return 0; } -int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) +PHPAPI int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) { int timeout = value->it_value.tv_sec * 1000 + value->it_value.tv_usec; int repeat = TIME_ONESHOT; diff --git a/win32/time.h b/win32/time.h index 457d4fa9e0..f0514ebe59 100644 --- a/win32/time.h +++ b/win32/time.h @@ -15,6 +15,7 @@ /* Include stuff ************************************************************ */ #include #include +#include /* Struct stuff ************************************************************* */ struct timezone { @@ -34,10 +35,10 @@ struct itimerval { #define ITIMER_PROF 2 /*generates sigprof */ /* Prototype stuff ********************************************************** */ -extern int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info); +PHPAPI extern int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info); /* setitimer operates at 100 millisecond resolution */ -extern int setitimer(int which, const struct itimerval *value, +PHPAPI extern int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue); #endif