mirror of
https://github.com/3proxy/3proxy.git
synced 2026-05-31 13:30:11 +08:00
Use C89 style declarations
This commit is contained in:
parent
289d2f5211
commit
1aecfa7995
11
src/log.c
11
src/log.c
@ -62,22 +62,25 @@ int dobuf2(struct clientparam * param, unsigned char * buf, const unsigned char
|
|||||||
long timezone;
|
long timezone;
|
||||||
unsigned delay;
|
unsigned delay;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
struct timeb tb;
|
||||||
|
#else
|
||||||
|
struct timeval tv;
|
||||||
|
struct timezone tz;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!logparam.srv) srvinit(&logsrv, &logparam);
|
if(!logparam.srv) srvinit(&logsrv, &logparam);
|
||||||
if(!param) param = &logparam;
|
if(!param) param = &logparam;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
struct timeb tb;
|
|
||||||
|
|
||||||
ftime(&tb);
|
ftime(&tb);
|
||||||
sec = (time_t)tb.time;
|
sec = (time_t)tb.time;
|
||||||
msec = (unsigned)tb.millitm;
|
msec = (unsigned)tb.millitm;
|
||||||
timezone = tm->tm_isdst*60 - tb.timezone;
|
timezone = tm->tm_isdst*60 - tb.timezone;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
|
||||||
struct timezone tz;
|
|
||||||
gettimeofday(&tv, &tz);
|
gettimeofday(&tv, &tz);
|
||||||
|
|
||||||
sec = (time_t)tv.tv_sec;
|
sec = (time_t)tv.tv_sec;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user