/*- * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. * * %sccs.include.redist.c% */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)cmpdi2.c 5.2 (Berkeley) 05/12/92"; #endif /* LIBC_SCCS and not lint */ #include "longlong.h" long int __cmpdi2 (a, b) long long a, b; { long_long au, bu; au.ll = a, bu.ll = b; if (au.s.high < bu.s.high) return 0; else if (au.s.high > bu.s.high) return 2; if ((unsigned) au.s.low < (unsigned) bu.s.low) return 0; else if ((unsigned) au.s.low > (unsigned) bu.s.low) return 2; return 1; }