Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
cba41d9b
Commit
cba41d9b
authored
Mar 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Remove checks for gettimeofday().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
96b815fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
28 deletions
+3
-28
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
config.h.in
include/config.h.in
+0
-3
mkstemps.c
libs/port/mkstemps.c
+3
-23
No files found.
configure
View file @
cba41d9b
...
...
@@ -16744,7 +16744,6 @@ for ac_func in \
getifaddrs
\
getopt_long_only
\
getpwuid
\
gettimeofday
\
getuid
\
kqueue
\
lstat
\
...
...
configure.ac
View file @
cba41d9b
...
...
@@ -2162,7 +2162,6 @@ AC_CHECK_FUNCS(\
getifaddrs \
getopt_long_only \
getpwuid \
gettimeofday \
getuid \
kqueue \
lstat \
...
...
include/config.h.in
View file @
cba41d9b
...
...
@@ -264,9 +264,6 @@
/* Define to 1 if you have the <gettext-po.h> header file. */
#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. */
#undef HAVE_GETUID
...
...
libs/port/mkstemps.c
View file @
cba41d9b
...
...
@@ -31,16 +31,6 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#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
#define TMP_MAX 16384
...
...
@@ -74,10 +64,8 @@ mkstemps (
{
static
const
char
letters
[]
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
;
static
gcc_uint64_t
value
;
#ifdef HAVE_GETTIMEOFDAY
static
unsigned
__int64
value
;
struct
timeval
tv
;
#endif
char
*
XXXXXX
;
size_t
len
;
int
count
;
...
...
@@ -92,17 +80,13 @@ mkstemps (
XXXXXX
=
&
template
[
len
-
6
-
suffix_len
];
#ifdef HAVE_GETTIMEOFDAY
/* Get some more or less random data. */
gettimeofday
(
&
tv
,
NULL
);
value
+=
((
gcc_uint64_t
)
tv
.
tv_usec
<<
16
)
^
tv
.
tv_sec
^
getpid
();
#else
value
+=
getpid
();
#endif
value
+=
((
unsigned
__int64
)
tv
.
tv_usec
<<
16
)
^
tv
.
tv_sec
^
getpid
();
for
(
count
=
0
;
count
<
TMP_MAX
;
++
count
)
{
gcc_uint64_t
v
=
value
;
unsigned
__int64
v
=
value
;
int
fd
;
/* Fill in the random bits. */
...
...
@@ -118,11 +102,7 @@ mkstemps (
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
);
#endif
if
(
fd
>=
0
)
/* The file does not exist. */
return
fd
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment