[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 36/254: tool_operate: use utimes instead of obsoles
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 36/254: tool_operate: use utimes instead of obsolescent utime when available |
Date: |
Sat, 17 Jun 2017 16:51:08 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.
commit 4da846a41ed19f2a81357d30cf210bf4616a8798
Author: Dan Fandrich <address@hidden>
AuthorDate: Thu Apr 27 01:24:07 2017 +0200
tool_operate: use utimes instead of obsolescent utime when available
---
configure.ac | 3 ++-
src/tool_operate.c | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9cc1eca27..5ef731260 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3294,7 +3294,8 @@ AC_CHECK_FUNCS([fork \
setmode \
setrlimit \
uname \
- utime
+ utime \
+ utimes
],[
],[
func="$ac_func"
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 724826c8e..5a129bd34 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -231,6 +231,17 @@ static void setfiletime(long filetime, const char
*filename,
"CreateFile failed: GetLastError %u\n",
filetime, GetLastError());
}
+
+#elif defined(HAVE_UTIMES)
+ struct timeval times[2];
+ times[0].tv_sec = times[1].tv_sec = filetime;
+ times[0].tv_usec = times[1].tv_usec = 0;
+ if(utimes(filename, times)) {
+ fprintf(error_stream,
+ "Failed to set filetime %ld on outfile: errno %d\n",
+ filetime, errno);
+ }
+
#elif defined(HAVE_UTIME)
struct utimbuf times;
times.actime = (time_t)filetime;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 07/254: typecheck-gcc: handle function pointers properly, (continued)
- [GNUnet-SVN] [gnurl] 07/254: typecheck-gcc: handle function pointers properly, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 23/254: typecheck-gcc: fix _curl_is_slist_info, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 24/254: nss: do not leak PKCS #11 slot while loading a key, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 09/254: gnutls: removed some code when --disable-verbose is configured, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 69/254: openssl: use local stack for temp storage, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 78/254: abstract-unix-socket.d: shorten the help text to fit within 79 cols, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 18/254: Makefile: avoid use of GNU-specific form of $<, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 33/254: cookie_interface.c: changed the other domain to example.com too, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 26/254: nss: load libnssckbi.so if no other trust is specified, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 29/254: http-proxy: remove unused argument from Curl_proxyCONNECT(), gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 36/254: tool_operate: use utimes instead of obsolescent utime when available,
gnunet <=
- [GNUnet-SVN] [gnurl] 32/254: cookie_interface.c: fix cookie domain so the example works, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 87/254: test557: set a known good numeric locale, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 89/254: tests/server: make string literals const, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 37/254: runtests.pl: support multiline <postcheck> commands, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 75/254: curl: non-boolean command line args reject --no- prefixes, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 52/254: anyauthput: remove unused code, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 39/254: url: fixed a memory leak on OOM while setting CURLOPT_BUFFERSIZE, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 108/254: test537: use correct variable type, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 103/254: buildconf: fix hang on IRIX, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 30/254: lib: remove unused code, gnunet, 2017/06/17