libport: Remove checks for gettimeofday().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
96b815fcca
commit
cba41d9bfd
1
configure
vendored
1
configure
vendored
@ -16744,7 +16744,6 @@ for ac_func in \
|
|||||||
getifaddrs \
|
getifaddrs \
|
||||||
getopt_long_only \
|
getopt_long_only \
|
||||||
getpwuid \
|
getpwuid \
|
||||||
gettimeofday \
|
|
||||||
getuid \
|
getuid \
|
||||||
kqueue \
|
kqueue \
|
||||||
lstat \
|
lstat \
|
||||||
|
@ -2162,7 +2162,6 @@ AC_CHECK_FUNCS(\
|
|||||||
getifaddrs \
|
getifaddrs \
|
||||||
getopt_long_only \
|
getopt_long_only \
|
||||||
getpwuid \
|
getpwuid \
|
||||||
gettimeofday \
|
|
||||||
getuid \
|
getuid \
|
||||||
kqueue \
|
kqueue \
|
||||||
lstat \
|
lstat \
|
||||||
|
@ -264,9 +264,6 @@
|
|||||||
/* Define to 1 if you have the <gettext-po.h> header file. */
|
/* Define to 1 if you have the <gettext-po.h> header file. */
|
||||||
#undef HAVE_GETTEXT_PO_H
|
#undef HAVE_GETTEXT_PO_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `gettimeofday' function. */
|
|
||||||
#undef HAVE_GETTIMEOFDAY
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `getuid' function. */
|
/* Define to 1 if you have the `getuid' function. */
|
||||||
#undef HAVE_GETUID
|
#undef HAVE_GETUID
|
||||||
|
|
||||||
|
@ -31,16 +31,6 @@
|
|||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_PROCESS_H
|
|
||||||
#include <process.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We need to provide a type for gcc_uint64_t. */
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__extension__ typedef unsigned long long gcc_uint64_t;
|
|
||||||
#else
|
|
||||||
typedef unsigned long gcc_uint64_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TMP_MAX
|
#ifndef TMP_MAX
|
||||||
#define TMP_MAX 16384
|
#define TMP_MAX 16384
|
||||||
@ -74,10 +64,8 @@ mkstemps (
|
|||||||
{
|
{
|
||||||
static const char letters[]
|
static const char letters[]
|
||||||
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||||
static gcc_uint64_t value;
|
static unsigned __int64 value;
|
||||||
#ifdef HAVE_GETTIMEOFDAY
|
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
#endif
|
|
||||||
char *XXXXXX;
|
char *XXXXXX;
|
||||||
size_t len;
|
size_t len;
|
||||||
int count;
|
int count;
|
||||||
@ -92,17 +80,13 @@ mkstemps (
|
|||||||
|
|
||||||
XXXXXX = &template[len - 6 - suffix_len];
|
XXXXXX = &template[len - 6 - suffix_len];
|
||||||
|
|
||||||
#ifdef HAVE_GETTIMEOFDAY
|
|
||||||
/* Get some more or less random data. */
|
/* Get some more or less random data. */
|
||||||
gettimeofday (&tv, NULL);
|
gettimeofday (&tv, NULL);
|
||||||
value += ((gcc_uint64_t) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
|
value += ((unsigned __int64) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
|
||||||
#else
|
|
||||||
value += getpid ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (count = 0; count < TMP_MAX; ++count)
|
for (count = 0; count < TMP_MAX; ++count)
|
||||||
{
|
{
|
||||||
gcc_uint64_t v = value;
|
unsigned __int64 v = value;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
/* Fill in the random bits. */
|
/* Fill in the random bits. */
|
||||||
@ -118,11 +102,7 @@ mkstemps (
|
|||||||
v /= 62;
|
v /= 62;
|
||||||
XXXXXX[5] = letters[v % 62];
|
XXXXXX[5] = letters[v % 62];
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd");
|
|
||||||
#else
|
|
||||||
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
|
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
|
||||||
#endif
|
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
/* The file does not exist. */
|
/* The file does not exist. */
|
||||||
return fd;
|
return fd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user