Portability fixes.

This commit is contained in:
Alexandre Julliard 2003-03-23 20:11:45 +00:00
parent 8d361bd41c
commit 8d7b8e573f
6 changed files with 15 additions and 1 deletions

2
configure vendored
View File

@ -13194,6 +13194,7 @@ fi
for ac_func in \ for ac_func in \
@ -13218,6 +13219,7 @@ for ac_func in \
getprotobynumber \ getprotobynumber \
getpwuid \ getpwuid \
getservbyport \ getservbyport \
gettimeofday \
inet_network \ inet_network \
lseek64 \ lseek64 \
lstat \ lstat \

View File

@ -950,6 +950,7 @@ AC_CHECK_FUNCS(\
getprotobynumber \ getprotobynumber \
getpwuid \ getpwuid \
getservbyport \ getservbyport \
gettimeofday \
inet_network \ inet_network \
lseek64 \ lseek64 \
lstat \ lstat \

View File

@ -149,6 +149,9 @@
/* Define to 1 if you have the `getservbyport' function. */ /* Define to 1 if you have the `getservbyport' function. */
#undef HAVE_GETSERVBYPORT #undef HAVE_GETSERVBYPORT
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <gif_lib.h> header file. */ /* Define to 1 if you have the <gif_lib.h> header file. */
#undef HAVE_GIF_LIB_H #undef HAVE_GIF_LIB_H

View File

@ -71,7 +71,9 @@ mkstemps (template, suffix_len)
static const char letters[] static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
static gcc_uint64_t value; static gcc_uint64_t 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;
@ -86,9 +88,13 @@ mkstemps (template, suffix_len)
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 += ((gcc_uint64_t) 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)
{ {

View File

@ -21,6 +21,8 @@
#include "config.h" #include "config.h"
#include "wine/port.h" #include "wine/port.h"
#include <errno.h>
#ifndef HAVE_USLEEP #ifndef HAVE_USLEEP
int usleep (unsigned int useconds) int usleep (unsigned int useconds)
{ {

View File

@ -81,7 +81,7 @@ C_SRCS = \
wctype.c \ wctype.c \
$(CODEPAGES:%=c_%.c) $(CODEPAGES:%=c_%.c)
all: $(MODULE) all: $(MODULE) $(MODULE:.dll=.a)
@MAKE_RULES@ @MAKE_RULES@