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
487c50c1
Commit
487c50c1
authored
Oct 30, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Remove futimes implementation from libport, it's only needed in ntdll.
parent
7b704102
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
67 deletions
+14
-67
file.c
dlls/ntdll/file.c
+14
-2
port.h
include/wine/port.h
+0
-6
Makefile.in
libs/port/Makefile.in
+0
-1
futimes.c
libs/port/futimes.c
+0
-58
No files found.
dlls/ntdll/file.c
View file @
487c50c1
...
...
@@ -1560,6 +1560,9 @@ NTSTATUS WINAPI NtSetVolumeInformationFile(
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
stat
st
;
...
...
@@ -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_usec
=
(
mtime
->
QuadPart
%
10000000
)
/
10
;
}
if
(
!
futimes
(
fd
,
tv
))
return
STATUS_SUCCESS
;
return
FILE_GetNtStatus
();
#ifdef HAVE_FUTIMES
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
,
...
...
include/wine/port.h
View file @
487c50c1
...
...
@@ -257,11 +257,6 @@ extern int getopt_long_only (int ___argc, char *const *___argv,
int
ffs
(
int
x
);
#endif
#ifndef HAVE_FUTIMES
struct
timeval
;
int
futimes
(
int
fd
,
const
struct
timeval
*
tv
);
#endif
#ifndef HAVE_GETPAGESIZE
size_t
getpagesize
(
void
);
#endif
/* HAVE_GETPAGESIZE */
...
...
@@ -456,7 +451,6 @@ extern unsigned char interlocked_cmpxchg128( __int64 *dest, __int64 xchg_high,
#define ffs __WINE_NOT_PORTABLE(ffs)
#define fstatvfs __WINE_NOT_PORTABLE(fstatvfs)
#define futimes __WINE_NOT_PORTABLE(futimes)
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
...
...
libs/port/Makefile.in
View file @
487c50c1
...
...
@@ -5,7 +5,6 @@ MODULE = libwine_port.a
C_SRCS
=
\
ffs.c
\
fstatvfs.c
\
futimes.c
\
getopt.c
\
getopt1.c
\
getpagesize.c
\
...
...
libs/port/futimes.c
deleted
100644 → 0
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 */
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