-/* Grrr... gcov drops a turd in the current directory. */
-void move_gcov_turd(const char *dir,
- struct ccan_file *file, const char *extension)
-{
- char *base, *gcovfile, *gcovdest;
-
- base = talloc_basename(file, file->name);
- gcovfile = talloc_asprintf(file, "%s/%.*s%s",
- dir, strlen(base)-2, base, extension);
- gcovdest = talloc_asprintf(file, "%s/%.*s%s",
- talloc_dirname(base, file->cov_compiled),
- strlen(base)-2, base, extension);
- if (!move_file(gcovfile, gcovdest))
- err(1, "Could not move %s to %s", gcovfile, gcovdest);
- talloc_free(base);
-}
-