Remove non-standard memswap.

Change-Id: I06548dda339987b755ef7139c590ca3e1f9fe0a9
This commit is contained in:
Elliott Hughes
2014-03-10 15:54:40 -07:00
parent 638e7892c6
commit 152b9de19a
4 changed files with 14 additions and 45 deletions

View File

@@ -59,4 +59,18 @@ extern "C" void** __get_tls() {
return __get_tls();
}
// This non-standard function was in our <string.h> for some reason.
extern "C" void memswap(void* m1, void* m2, size_t n) {
char* p = reinterpret_cast<char*>(m1);
char* p_end = p + n;
char* q = reinterpret_cast<char*>(m2);
while (p < p_end) {
char tmp = *p;
*p = *q;
*q = tmp;
p++;
q++;
}
}
#endif