summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-08-29 06:14:05 +0000
committerpeter <peter@FreeBSD.org>1997-08-29 06:14:05 +0000
commit5b5d694bfba7ce510ad042b8612bf0412362431c (patch)
treecf6cc4dd675750d4375e40c504c53f3874799261 /contrib
parent5c7910da9437ec1a550528009746ffecfc81f562 (diff)
downloadFreeBSD-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.c21
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)
OpenPOWER on IntegriCloud