append_to_file (char const *from, char const *to)
{
  int to_flags = O_WRONLY | O_APPEND | O_BINARY;
  int tofd;

  if (! follow_symlinks)
    to_flags |= O_NOFOLLOW;
  if ((tofd = safe_open (to, to_flags, 0)) < 0)
    pfatal ("Can't reopen file %s", quotearg (to));
  copy_to_fd (from, tofd);
  if (close (tofd) != 0)
    write_fatal ();
}
append_to_file (char const *from, char const *to)
{
  int to_flags = O_WRONLY | O_APPEND | O_BINARY;
  int tofd;

  if (! follow_symlinks)
    to_flags |= O_NOFOLLOW;
  if ((tofd = safe_open (to, to_flags, 0)) < 0)
    pfatal ("Can't reopen file %s", quotearg (to));
  copy_to_fd (from, tofd);
  if (close (tofd) != 0)
    write_fatal ();
}