Commit 46f3381a authored by Jan Djärv's avatar Jan Djärv

* etags.c (absolute_filename): Use memove if we have it for overlapping copy.

parent 581e51e8
2009-11-23 Tobias Ringström <tobias@ringis.se> (tiny change)
* etags.c (absolute_filename): Use memove if we have it for
overlapping copy.
2009-11-04 Dan Nicolaescu <dann@ics.uci.edu> 2009-11-04 Dan Nicolaescu <dann@ics.uci.edu>
* make-docfile.c (scan_lisp_file): Also look for `defvaralias'. * make-docfile.c (scan_lisp_file): Also look for `defvaralias'.
......
...@@ -6695,13 +6695,22 @@ absolute_filename (file, dir) ...@@ -6695,13 +6695,22 @@ absolute_filename (file, dir)
else if (cp[0] != '/') else if (cp[0] != '/')
cp = slashp; cp = slashp;
#endif #endif
#ifdef HAVE_MEMMOVE
memmove (cp, slashp + 3, strlen (slashp + 2));
#else
/* Overlapping copy isn't really okay */
strcpy (cp, slashp + 3); strcpy (cp, slashp + 3);
#endif
slashp = cp; slashp = cp;
continue; continue;
} }
else if (slashp[2] == '/' || slashp[2] == '\0') else if (slashp[2] == '/' || slashp[2] == '\0')
{ {
strcpy (slashp, slashp + 2); #ifdef HAVE_MEMMOVE
memmove (slashp, slashp + 2, strlen (slashp + 1));
#else
strcpy (slashp, slashp + 2);
#endif
continue; continue;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment