* cygwin.din (futimes): Export.
(lutimes): Export. * times.cc (utimes_worker): Created from utimes, add nofollow flag to implement utimes and lutimes. (utimes): Just call utimes_worker. (lutimes): New function. (futimes): Ditto. * include/cygwin/version.h: Bump API minor version.
This commit is contained in:
parent
af18e12c9f
commit
81bd1ca723
|
@ -1,3 +1,14 @@
|
||||||
|
2005-10-20 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* cygwin.din (futimes): Export.
|
||||||
|
(lutimes): Export.
|
||||||
|
* times.cc (utimes_worker): Created from utimes, add nofollow flag
|
||||||
|
to implement utimes and lutimes.
|
||||||
|
(utimes): Just call utimes_worker.
|
||||||
|
(lutimes): New function.
|
||||||
|
(futimes): Ditto.
|
||||||
|
* include/cygwin/version.h: Bump API minor version.
|
||||||
|
|
||||||
2005-10-19 Christopher Faylor <cgf@timesys.com>
|
2005-10-19 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* sigproc.cc (child_info::sync): Move check for !wr_proc_pipe lower.
|
* sigproc.cc (child_info::sync): Move check for !wr_proc_pipe lower.
|
||||||
|
|
|
@ -1522,6 +1522,8 @@ utime SIGFE
|
||||||
_utime = utime SIGFE
|
_utime = utime SIGFE
|
||||||
utimes SIGFE
|
utimes SIGFE
|
||||||
_utimes = utimes SIGFE
|
_utimes = utimes SIGFE
|
||||||
|
futimes SIGFE
|
||||||
|
lutimes SIGFE
|
||||||
utmpname SIGFE
|
utmpname SIGFE
|
||||||
_utmpname = utmpname SIGFE
|
_utmpname = utmpname SIGFE
|
||||||
utmpxname SIGFE
|
utmpxname SIGFE
|
||||||
|
|
|
@ -278,12 +278,13 @@ details. */
|
||||||
139: Start using POSIX definition of struct msghdr and WinSock2
|
139: Start using POSIX definition of struct msghdr and WinSock2
|
||||||
IPPROTO_IP values.
|
IPPROTO_IP values.
|
||||||
140: Export mlock, munlock.
|
140: Export mlock, munlock.
|
||||||
|
140: Export futimes, lutimes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||||
|
|
||||||
#define CYGWIN_VERSION_API_MAJOR 0
|
#define CYGWIN_VERSION_API_MAJOR 0
|
||||||
#define CYGWIN_VERSION_API_MINOR 140
|
#define CYGWIN_VERSION_API_MINOR 141
|
||||||
|
|
||||||
/* There is also a compatibity version number associated with the
|
/* There is also a compatibity version number associated with the
|
||||||
shared memory regions. It is incremented when incompatible
|
shared memory regions. It is incremented when incompatible
|
||||||
|
|
|
@ -441,12 +441,11 @@ gmtime (const time_t *tim_p)
|
||||||
|
|
||||||
#endif /* POSIX_LOCALTIME */
|
#endif /* POSIX_LOCALTIME */
|
||||||
|
|
||||||
/* utimes: POSIX/SUSv3 */
|
static int
|
||||||
extern "C" int
|
utimes_worker (const char *path, const struct timeval *tvp, int nofollow)
|
||||||
utimes (const char *path, const struct timeval *tvp)
|
|
||||||
{
|
{
|
||||||
int res = -1;
|
int res = -1;
|
||||||
path_conv win32 (path, PC_SYM_FOLLOW);
|
path_conv win32 (path, nofollow ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW);
|
||||||
fhandler_base *fh = NULL;
|
fhandler_base *fh = NULL;
|
||||||
bool fromfd = false;
|
bool fromfd = false;
|
||||||
|
|
||||||
|
@ -482,6 +481,35 @@ error:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* utimes: POSIX/SUSv3 */
|
||||||
|
extern "C" int
|
||||||
|
utimes (const char *path, const struct timeval *tvp)
|
||||||
|
{
|
||||||
|
return utimes_worker (path, tvp, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BSD */
|
||||||
|
extern "C" int
|
||||||
|
lutimes (const char *path, const struct timeval *tvp)
|
||||||
|
{
|
||||||
|
return utimes_worker (path, tvp, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BSD */
|
||||||
|
extern "C" int
|
||||||
|
futimes (int fd, const struct timeval *tvp)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
|
||||||
|
cygheap_fdget cfd (fd);
|
||||||
|
if (cfd < 0)
|
||||||
|
res = -1;
|
||||||
|
else
|
||||||
|
res = cfd->utimes (tvp);
|
||||||
|
syscall_printf ("%d = futimes (%d, %p)", res, fd, tvp);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/* utime: POSIX 5.6.6.1 */
|
/* utime: POSIX 5.6.6.1 */
|
||||||
extern "C" int
|
extern "C" int
|
||||||
utime (const char *path, const struct utimbuf *buf)
|
utime (const char *path, const struct utimbuf *buf)
|
||||||
|
|
Loading…
Reference in New Issue