I guess one has to check the ANSI C standard to be sure, but at least the glibc manual says "The value returned has the same sign as the difference between the first differing pair of bytes (interpreted as `unsigned char' objects, then promoted to `int')."
/ Niels Möller ()
Previous text:
2003-01-31 12:14: Subject: XPM and sort
I belive memcmp compares bytes as unsigned on some systems and signed on others. Is that wrong?
/ Martin Nilsson (Åskblod)