home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
-
- /************************************************************************/
-
- #undef memcmp
-
- #if defined(__SASC_510)
-
- int memcmp(const void *s1, const void *s2, size_t n)
-
- {
- return __builtin_memcmp(s1,s2,n);
- }
-
- #else
-
- int memcmp(const void *s1, const void *s2, size_t n)
-
- {
- int r=0;
-
- if (n != 0)
- {
- const unsigned char *c1;
- const unsigned char *c2;
-
- c1=s1;
- c2=s2;
- while (!(r=*c1++-*c2++) && (--n != 0))
- ;
- }
- return r;
- }
-
- #endif
-