diff options
author | peter <peter@FreeBSD.org> | 1997-08-29 06:14:05 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-08-29 06:14:05 +0000 |
commit | 5b5d694bfba7ce510ad042b8612bf0412362431c (patch) | |
tree | cf6cc4dd675750d4375e40c504c53f3874799261 /contrib | |
parent | 5c7910da9437ec1a550528009746ffecfc81f562 (diff) | |
download | FreeBSD-src-5b5d694bfba7ce510ad042b8612bf0412362431c.zip FreeBSD-src-5b5d694bfba7ce510ad042b8612bf0412362431c.tar.gz |
"fix" this for compiling under the sticter ELF linker.. There was a
reference to an undefined function (digit_value_in_base()) that was static
elsewhere that it was used.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libgmp/mpbsd/min.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/libgmp/mpbsd/min.c b/contrib/libgmp/mpbsd/min.c index 6edb171..7ffad6c 100644 --- a/contrib/libgmp/mpbsd/min.c +++ b/contrib/libgmp/mpbsd/min.c @@ -26,6 +26,27 @@ MA 02111-1307, USA. */ #include "gmp.h" #include "gmp-impl.h" +static int +digit_value_in_base (c, base) + int c; + int base; +{ + int digit; + + if (isdigit (c)) + digit = c - '0'; + else if (islower (c)) + digit = c - 'a' + 10; + else if (isupper (c)) + digit = c - 'A' + 10; + else + return -1; + + if (digit < base) + return digit; + return -1; +} + void #if __STDC__ min (MINT *dest) |