/* * Copyright 2008, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT license. */ #include #include #include #define LACKS_ZERO_BYTE(value) \ (((value - 0x01010101) & ~value & 0x80808080) == 0) int strcmp(char const *a, char const *b) { while (true) { int cmp = (unsigned char)*a - (unsigned char)*b++; if (cmp != 0 || *a++ == '\0') return cmp; } }