ra@is.uu.no (Robert Andersson) (09/05/90)
This is on a DECstation 3100 running Ultrix 3.1. Am I dreaming, or is
really memcmp() broken? I get wild results from the last two memcmp
calls. Test program follows:
#include <memory.h>
#include <stdio.h>
main()
{
/* These two work */
printf("%d\n", memcmp("180", "200", 3));
printf("%d\n", memcmp("200", "180", 3));
/* But these don't */
printf("%d\n", memcmp("1800", "2000", 4));
printf("%d\n", memcmp("2000", "1800", 4));
}
--
Robert Andersson, International Systems A/S, Oslo, Norway.
Internet: ra@is.uu.no
UUCP: ...!{uunet,mcsun,ifi}!is.uu.no!ra
alan@shodha.enet.dec.com ( Alan's Home for Wayward Notes File.) (09/05/90)
In article <1990Sep4.185612.21345@is.uu.no>, ra@is.uu.no (Robert Andersson) writes: > This is on a DECstation 3100 running Ultrix 3.1. Am I dreaming, or is > really memcmp() broken? I get wild results from the last two memcmp > calls. Test program follows: > > [ Example program followed... ] If I remember my list of patches correctly, yes, memcmp() is broken. The patch and instructions should be available from your local CSC. The patch is a new copy of memcmp.o. > -- > Robert Andersson, International Systems A/S, Oslo, Norway. -- Alan Rollow alan@nabeth.enet.dec.com