Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
487c50c1
Commit
487c50c1
authored
12 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
ntdll: Remove futimes implementation from libport, it's only needed in ntdll.
parent
7b704102
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/ntdll/file.c
+14
-2
14 additions, 2 deletions
dlls/ntdll/file.c
include/wine/port.h
+0
-6
0 additions, 6 deletions
include/wine/port.h
libs/port/Makefile.in
+0
-1
0 additions, 1 deletion
libs/port/Makefile.in
libs/port/futimes.c
+0
-58
0 additions, 58 deletions
libs/port/futimes.c
with
14 additions
and
67 deletions
dlls/ntdll/file.c
+
14
−
2
View file @
487c50c1
...
@@ -1560,6 +1560,9 @@ NTSTATUS WINAPI NtSetVolumeInformationFile(
...
@@ -1560,6 +1560,9 @@ NTSTATUS WINAPI NtSetVolumeInformationFile(
static
NTSTATUS
set_file_times
(
int
fd
,
const
LARGE_INTEGER
*
mtime
,
const
LARGE_INTEGER
*
atime
)
static
NTSTATUS
set_file_times
(
int
fd
,
const
LARGE_INTEGER
*
mtime
,
const
LARGE_INTEGER
*
atime
)
{
{
NTSTATUS
status
=
STATUS_SUCCESS
;
#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT)
struct
timeval
tv
[
2
];
struct
timeval
tv
[
2
];
struct
stat
st
;
struct
stat
st
;
...
@@ -1590,8 +1593,17 @@ static NTSTATUS set_file_times( int fd, const LARGE_INTEGER *mtime, const LARGE_
...
@@ -1590,8 +1593,17 @@ static NTSTATUS set_file_times( int fd, const LARGE_INTEGER *mtime, const LARGE_
tv
[
1
].
tv_sec
=
mtime
->
QuadPart
/
10000000
-
SECS_1601_TO_1970
;
tv
[
1
].
tv_sec
=
mtime
->
QuadPart
/
10000000
-
SECS_1601_TO_1970
;
tv
[
1
].
tv_usec
=
(
mtime
->
QuadPart
%
10000000
)
/
10
;
tv
[
1
].
tv_usec
=
(
mtime
->
QuadPart
%
10000000
)
/
10
;
}
}
if
(
!
futimes
(
fd
,
tv
))
return
STATUS_SUCCESS
;
#ifdef HAVE_FUTIMES
return
FILE_GetNtStatus
();
if
(
futimes
(
fd
,
tv
)
==
-
1
)
status
=
FILE_GetNtStatus
();
#elif defined(HAVE_FUTIMESAT)
if
(
futimesat
(
fd
,
NULL
,
tv
)
==
-
1
)
status
=
FILE_GetNtStatus
();
#endif
#else
/* HAVE_FUTIMES || HAVE_FUTIMESAT */
FIXME
(
"setting file times not supported
\n
"
);
status
=
STATUS_NOT_IMPLEMENTED
;
#endif
return
status
;
}
}
static
inline
void
get_file_times
(
const
struct
stat
*
st
,
LARGE_INTEGER
*
mtime
,
LARGE_INTEGER
*
ctime
,
static
inline
void
get_file_times
(
const
struct
stat
*
st
,
LARGE_INTEGER
*
mtime
,
LARGE_INTEGER
*
ctime
,
...
...
This diff is collapsed.
Click to expand it.
include/wine/port.h
+
0
−
6
View file @
487c50c1
...
@@ -257,11 +257,6 @@ extern int getopt_long_only (int ___argc, char *const *___argv,
...
@@ -257,11 +257,6 @@ extern int getopt_long_only (int ___argc, char *const *___argv,
int
ffs
(
int
x
);
int
ffs
(
int
x
);
#endif
#endif
#ifndef HAVE_FUTIMES
struct
timeval
;
int
futimes
(
int
fd
,
const
struct
timeval
*
tv
);
#endif
#ifndef HAVE_GETPAGESIZE
#ifndef HAVE_GETPAGESIZE
size_t
getpagesize
(
void
);
size_t
getpagesize
(
void
);
#endif
/* HAVE_GETPAGESIZE */
#endif
/* HAVE_GETPAGESIZE */
...
@@ -456,7 +451,6 @@ extern unsigned char interlocked_cmpxchg128( __int64 *dest, __int64 xchg_high,
...
@@ -456,7 +451,6 @@ extern unsigned char interlocked_cmpxchg128( __int64 *dest, __int64 xchg_high,
#define ffs __WINE_NOT_PORTABLE(ffs)
#define ffs __WINE_NOT_PORTABLE(ffs)
#define fstatvfs __WINE_NOT_PORTABLE(fstatvfs)
#define fstatvfs __WINE_NOT_PORTABLE(fstatvfs)
#define futimes __WINE_NOT_PORTABLE(futimes)
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
...
...
This diff is collapsed.
Click to expand it.
libs/port/Makefile.in
+
0
−
1
View file @
487c50c1
...
@@ -5,7 +5,6 @@ MODULE = libwine_port.a
...
@@ -5,7 +5,6 @@ MODULE = libwine_port.a
C_SRCS
=
\
C_SRCS
=
\
ffs.c
\
ffs.c
\
fstatvfs.c
\
fstatvfs.c
\
futimes.c
\
getopt.c
\
getopt.c
\
getopt1.c
\
getopt1.c
\
getpagesize.c
\
getpagesize.c
\
...
...
This diff is collapsed.
Click to expand it.
libs/port/futimes.c
deleted
100644 → 0
+
0
−
58
View file @
7b704102
/*
* futimes function
*
* Copyright 2004 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include
"config.h"
#include
"wine/port.h"
#ifndef HAVE_FUTIMES
#include
<sys/types.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_UTIME_H
# include <utime.h>
#endif
#include
<stdio.h>
#include
<errno.h>
int
futimes
(
int
fd
,
const
struct
timeval
tv
[
2
])
{
#ifdef linux
char
buffer
[
sizeof
(
"/proc/self/fd/"
)
+
3
*
sizeof
(
int
)];
sprintf
(
buffer
,
"/proc/self/fd/%u"
,
fd
);
if
(
tv
)
{
struct
utimbuf
ut
;
ut
.
actime
=
tv
[
0
].
tv_sec
+
(
tv
[
0
].
tv_usec
+
500000
)
/
1000000
;
ut
.
modtime
=
tv
[
1
].
tv_sec
+
(
tv
[
1
].
tv_usec
+
500000
)
/
1000000
;
return
utime
(
buffer
,
&
ut
);
}
else
return
utime
(
buffer
,
NULL
);
#elif defined(HAVE_FUTIMESAT)
return
futimesat
(
fd
,
NULL
,
tv
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#endif
/* HAVE_FUTIMES */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment