blob: 6c595959e632f0c98a5677b9c429619adf0bf6f7 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001/* vi: set sw=4 ts=4: */
2/*
3 * div for uClibc
4 * Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
5 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 */
7
8#include <stdlib.h>
9
10div_t div(int numer, int denom)
11{
12 div_t result;
13 result.quot = numer / denom;
14 result.rem = numer - (result.quot * denom);
15 return(result);
16}
17