diff --git a/ext/bcmath/config.m4 b/ext/bcmath/config.m4 index ee9fa3f3c9e1c..7513f63fef102 100644 --- a/ext/bcmath/config.m4 +++ b/ext/bcmath/config.m4 @@ -7,7 +7,7 @@ if test "$PHP_BCMATH" != "no"; then PHP_NEW_EXTENSION(bcmath, bcmath.c \ libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/raisemod.c libbcmath/src/sub.c \ libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \ -libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \ +libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \ libbcmath/src/rmzero.c libbcmath/src/str2num.c, $ext_shared,,-I@ext_srcdir@/libbcmath/src -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) PHP_ADD_BUILD_DIR($ext_builddir/libbcmath/src) diff --git a/ext/bcmath/config.w32 b/ext/bcmath/config.w32 index 04ffa31d58384..0282315e1ade5 100644 --- a/ext/bcmath/config.w32 +++ b/ext/bcmath/config.w32 @@ -6,7 +6,7 @@ if (PHP_BCMATH == "yes") { EXTENSION("bcmath", "bcmath.c", null, "-Iext/bcmath/libbcmath/src /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); ADD_SOURCES("ext/bcmath/libbcmath/src", "add.c div.c init.c neg.c \ raisemod.c sub.c compare.c divmod.c int2num.c \ - num2long.c output.c recmul.c sqrt.c zero.c debug.c doaddsub.c \ + num2long.c output.c recmul.c sqrt.c zero.c doaddsub.c \ nearzero.c num2str.c raise.c rmzero.c str2num.c", "bcmath"); AC_DEFINE('HAVE_BCMATH', 1, 'Have BCMATH library'); diff --git a/ext/bcmath/libbcmath/src/debug.c b/ext/bcmath/libbcmath/src/debug.c deleted file mode 100644 index d723dba86fe3c..0000000000000 --- a/ext/bcmath/libbcmath/src/debug.c +++ /dev/null @@ -1,60 +0,0 @@ -/* debug.c: bcmath library file. */ -/* - Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc. - Copyright (C) 2000 Philip A. Nelson - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. (LICENSE) - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to: - - The Free Software Foundation, Inc. - 59 Temple Place, Suite 330 - Boston, MA 02111-1307 USA. - - You may contact the author by: - e-mail: philnelson@acm.org - us-mail: Philip A. Nelson - Computer Science Department, 9062 - Western Washington University - Bellingham, WA 98226-9062 - -*************************************************************************/ - -#include -#include "bcmath.h" -#include "private.h" -#include - -/* pn prints the number NUM in base 10. */ - -static void out_char(char c) -{ - putchar(c); -} - - -void pn(bc_num num) -{ - bc_out_num(num, 10, out_char, 0); - out_char('\n'); -} - - -/* pv prints a character array as if it was a string of bcd digits. */ -void pv(char *name, unsigned char *num, size_t len) -{ - printf("%s=", name); - for (size_t i = 0; i < len; i++) { - printf("%c", BCD_CHAR(num[i])); - } - printf("\n"); -}