<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 09/12/2013 09:37, Neil Henning
wrote:<br>
</div>
<blockquote cite="mid:52A58F3C.3070901@neil-henning.co.uk"
type="cite">Hey all,
<br>
<br>
Thanks for the comments! I was reluctant to make it work on any
non-Android UNIX platform without either futimes or futimens
simply because I don't have the targets to hand to test that on!
<br>
<br>
In terms of making the call a no-op - would it be acceptable to
then make it work on non-Android UNIX platforms like Pete Cooper
suggested? That way I wouldn't have to include any mention of
ANDROID at all in the patch, and the expected behaviour of the
function setLastModificationAndAccessTime would become 'Set the
modification and access time if we can, if not no problem!'
<br>
<br>
Thoughts?
<br>
</blockquote>
<br>
Neil,<br>
<br>
The right thing to do here is (in pseudo-code):<br>
<br>
<code>error_code setLastModificationAndAccessTime() {</code><code><br>
</code><code>#if defined(HAVE_FUTIMENS)</code><code><br>
</code><code> return ...</code><code>;</code><code><br>
</code><code>#elif defined(HAVE_FUTIMES)</code><code><br>
</code><code> return ...</code><code>;</code><code><br>
</code><code>#elif defined(__ANDROID__)</code><code><br>
</code><code> return ENOTAVAIL;</code><code><br>
</code><code>#</code><code>else</code><code><br>
</code><code>#warning Missing futimes() and futimens()</code><code><br>
</code><code> return ENOTIMPL;</code><code><br>
</code><code>#</code><code>endif</code><code><br>
</code><code>}</code><br>
<br>
The actual error codes don't matter too much as long as they don't
return success*.<br>
<br>
This has all the properties we want and makes the existing code a
little more defensive and portable.<br>
<br>
The rationale is that if the libc is missing such a basic function,
the platform vendor is giving us a strong hint that it's not useful
to set filesystem stamps on that platform anyway. The new version of
Android will "just work" when HAVE_FUTIME[N]S gets detected at
configure time and presumably it'll be an explicitly supported
feature that we can legitimately use.<br>
<br>
Here to review your updated patch when ready.<br>
<br>
Alp.<br>
<br>
<blockquote cite="mid:52A58F3C.3070901@neil-henning.co.uk"
type="cite">
<br>
-Neil.
<br>
<br>
On 08/12/2013 02:21, Rafael Espíndola wrote:
<br>
<blockquote type="cite">
<blockquote type="cite">This needs a cost vs. benefit analysis
before going any further...
<br>
<br>
Cost:
<br>
Maintaining direct Linux syscalls is a burden to the
project.
<br>
<br>
Benefits:
<br>
Adding the syscall may provide command-line users on older
Android
<br>
versions some limited support for the llvm-ar tool's obscure
-o option to
<br>
preserve timestamps.
<br>
<br>
On balance, I'd go for making this a no-op :-)
<br>
</blockquote>
Even better :-) (assuming people are not somehow depending on
-o).
<br>
<br>
Cheers,
<br>
Rafael
<br>
_______________________________________________
<br>
llvm-commits mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
<br>
</blockquote>
<br>
<br>
_______________________________________________
<br>
llvm-commits mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.nuanti.com">http://www.nuanti.com</a>
the browser experts
</pre>
</body>
</html>