libport: Avoid issues with struct timeval on Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fb4c127705
commit
d45d751d76
@ -65,7 +65,6 @@ mkstemps (
|
|||||||
static const char letters[]
|
static const char letters[]
|
||||||
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||||
static unsigned __int64 value;
|
static unsigned __int64 value;
|
||||||
struct timeval tv;
|
|
||||||
char *XXXXXX;
|
char *XXXXXX;
|
||||||
size_t len;
|
size_t len;
|
||||||
int count;
|
int count;
|
||||||
@ -80,9 +79,14 @@ mkstemps (
|
|||||||
|
|
||||||
XXXXXX = &template[len - 6 - suffix_len];
|
XXXXXX = &template[len - 6 - suffix_len];
|
||||||
|
|
||||||
/* Get some more or less random data. */
|
#ifndef _WIN32
|
||||||
gettimeofday (&tv, NULL);
|
{
|
||||||
value += ((unsigned __int64) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
|
struct timeval tv;
|
||||||
|
gettimeofday( &tv, NULL );
|
||||||
|
value += ((unsigned __int64) tv.tv_usec << 16) ^ tv.tv_sec;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
value += getpid();
|
||||||
|
|
||||||
for (count = 0; count < TMP_MAX; ++count)
|
for (count = 0; count < TMP_MAX; ++count)
|
||||||
{
|
{
|
||||||
|
@ -35,6 +35,13 @@
|
|||||||
|
|
||||||
#define FD_SETSIZE 64
|
#define FD_SETSIZE 64
|
||||||
|
|
||||||
|
struct __ms_timeval
|
||||||
|
{
|
||||||
|
long tv_sec;
|
||||||
|
long tv_usec;
|
||||||
|
};
|
||||||
|
#define timeval __ms_timeval
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
unsigned int fd_count;
|
unsigned int fd_count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user