reactos/lib/sdk/crt/mem/memcmp.c
Timo Kreuzer a3623f23de [CRT]
- Make all x86assembly ML compatible
- Remove memcpy, it was duplicated from memmove, copy the label instead
- Guard some code against compilation on msvc, as these functions are intrinsics on MSVC and cannot be implemented
- Fix some x64 assembly (don't modify stack below rsp)

svn path=/branches/cmake-bringup/; revision=49421
2010-11-02 00:06:33 +00:00

22 lines
316 B
C

/*
* $Id$
*/
#ifndef _MSC_VER
#include <string.h>
int memcmp(const void *s1, const void *s2, size_t n)
{
if (n != 0) {
const unsigned char *p1 = s1, *p2 = s2;
do {
if (*p1++ != *p2++)
return (*--p1 - *--p2);
} while (--n != 0);
}
return 0;
}
#endif