* Copyright (c) 1990 Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)ldiv.c 5.1 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdlib.h> /* ldiv_t */
* I AM NOT SURE THIS IS COMPLETELY PORTABLE
* (or that it is even right)
/* see div.c for comments */
if (num
> 0 && denom
< 0) {
if (num
< 0 && denom
> 0) {