reactos/lib/sdk/crt/mem/memcmp.c
Timo Kreuzer 0fab7e8671 [CRT]
On MSVC mark abs, labs and strcmp as intrinsics (needed when compiling with /O2+) and disable a warning that they are not intrinsics (when compiled with /O1)

svn path=/branches/cmake-bringup/; revision=50494
2011-01-25 20:48:56 +00:00

23 lines
370 B
C

/*
* $Id$
*/
#include <string.h>
#ifdef _MSC_VER
#pragma warning(disable: 4164)
#pragma function(memcmp)
#endif
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;
}