remove struct timezone from time.h, always declare __tzset(), revert changes from 38052 to ftp.

svn path=/trunk/; revision=38237
This commit is contained in:
Timo Kreuzer 2008-12-21 17:26:39 +00:00
parent 9483d7bc6c
commit 79532867dd
4 changed files with 10 additions and 20 deletions

View file

@ -1,6 +1,5 @@
#include <stdio.h>
//#include <time.h>
#include <sys/time.h>
#include <time.h>
#include <winsock.h>
#include "fake.h"
#include "prototypes.h"
@ -308,13 +307,12 @@ int access(const char *filename, int accessmethod)
#define EPOCHFILETIME (116444736000000000LL)
#endif
int gettimeofday(struct timeval *tv, void *tz0)
int gettimeofday(struct timeval *tv, struct timezone *tz)
{
FILETIME ft;
LARGE_INTEGER li;
__int64 t;
static int tzflag;
struct timezone *tz = tz0;
if (tv)
{

View file

@ -9,4 +9,9 @@
#define strcasecmp strcmp
#define strncasecmp strnicmp
void __cdecl _tzset(void);
struct timezone {
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
int gettimeofday(struct timeval *tv, struct timezone *tz);

View file

@ -2,7 +2,7 @@
#include "fake.h"
#include "prototypes.h"
#include <setjmp.h>
#include <sys/time.h>
#include <time.h>
//typedef void (*Sig_t)(int);

View file

@ -145,9 +145,8 @@ extern "C" {
_CRTIMP __time32_t __cdecl _mkgmtime32(struct tm *_Tm);
#if defined (_POSIX_) || defined(__GNUC__)
void __cdecl tzset(void);
#else
_CRTIMP void __cdecl _tzset(void);
#endif
_CRTIMP void __cdecl _tzset(void);
#if _INTEGRAL_MAX_BITS >= 64
double __cdecl _difftime64(__time64_t _Time1,__time64_t _Time2);
@ -236,18 +235,6 @@ struct timeval {
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif /* _TIMEVAL_DEFINED */
#ifndef __STRICT_ANSI__
#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
#define _TIMEZONE_DEFINED
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
#endif
#endif /* __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif