[PATCH] Bug 16442 - Missing futimes() on Solaris

Eric Christopher echristo at gmail.com
Wed Jul 3 11:45:42 PDT 2013


Hmm? Haven't done this yet, but I don't understand your comment.

-eric

On Wed, Jul 3, 2013 at 7:29 AM, Игорь Пашев <pashev.igor at gmail.com> wrote:
> Same for lib/Support/Unix/Path.inc.
>
> And now it looks like a mess.
>
> --- lib/Support/Unix/Path.inc   (revision 185535)
> +++ lib/Support/Unix/Path.inc   (working copy)
> @@ -626,11 +626,21 @@
>  }
>
>  error_code setLastModificationAndAccessTime(int FD, TimeValue Time) {
> +#if HAVE_FUTIMENS
> +  timespec Times[2];
> +  Times[0].tv_sec = Time.toPosixTime();
> +  Times[0].tv_nsec = 0;
> +  Times[1] = Times[0];
> +  if (::futimens(FD, Times))
> +#elif HAVE_FUTIMES
>    timeval Times[2];
>    Times[0].tv_sec = Time.toPosixTime();
>    Times[0].tv_usec = 0;
>    Times[1] = Times[0];
>    if (::futimes(FD, Times))
> +#else
> +#error Missing futimes() and futimens()
> +#endif
>      return error_code(errno, system_category());
>    return error_code::success();
>  }




More information about the llvm-commits mailing list