RE: [PHP-DEV] Fwd: [PHP-CVS] cvs: php4 /ext/bcmath bcmath.c/ext/bcmath/libbcmath/src bcmath.h init.c output.c raise.c raisemod.c recmul.csqrt.c str2num.c zero.c

2002-11-20 Thread Andi Gutmans
Yeah. Well they definitely existed because the author removed the GPL 
restriction and I was building it two hours ago :)

Andi

At 08:40 PM 11/20/2002 +, James Cox wrote:
well.

the cvs log for these files show Zeev deleted them 3 years ago (after
removing the content). They were GPL'ed, so clearly deleting them was the
only option...

  number.c   1.7   zeev3 yearsWe'll have to live without these files
somehow.
  number.h   1.5   zeev3 yearsWe'll have to live without these files
somehow.

http://cvs.php.net/cvs.php/php4/ext/bcmath?login=2&sa=1

obviously your commit & revert caused the files to diseapear from your
checkout -- but i noticed them in my checkouts, and they were still present.
more cvs wierdness, and more reason to look for an alternative.

 -- james

> -Original Message-
> From: Andi Gutmans [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 20, 2002 8:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] Fwd: [PHP-CVS] cvs: php4 /ext/bcmath bcmath.c
> /ext/bcmath/libbcmath/src bcmath.h init.c output.c raise.c raisemod.c
> recmul.c sqrt.c str2num.c zero.c
>
>
> I have backups of number.c and number.h but I see them in Attic/ so it
> might be better to restore them so that we keep the history. Anyone know
> how to do it? mv Attic/number* . doesn't seem to work.
>
> Andi
>
> At 10:08 PM 11/20/2002 +0200, Andi Gutmans wrote:
> >There seems to be some bug in CVS. After I reverted this patch number.c
> >and number.h from within ext/bcmath are missing. If I erase them
> and do a
> >cvs update I don't get them anymore. I definitely didn't remove them.
> >Anyone have any idea?
> >
> >Andi
> >
> >>From: "Andi Gutmans" <[EMAIL PROTECTED]>
> >>To: [EMAIL PROTECTED]
> >>Date: Wed, 20 Nov 2002 19:48:13 -
> >>Subject: [PHP-CVS] cvs: php4 /ext/bcmath
> >>bcmath.c  /ext/bcmath/libbcmath/src bcmath.h init.c output.c raise.c
> >>raisemod.c recmul.c sqrt.c str2num.c zero.c
> >>X-Bogosity: No, tests=bogofilter, spamicity=0.255710, version=0.8.0
> >>
> >>andiWed Nov 20 14:48:13 2002 EDT
> >>
> >>   Modified files:
> >> /php4/ext/bcmathbcmath.c
> >> /php4/ext/bcmath/libbcmath/src  bcmath.h init.c
> output.c raise.c
> >> raisemod.c recmul.c
> sqrt.c str2num.c
> >> zero.c
> >>   Log:
> >>   - Intermediate commit which works on making bcmath thread-safe.
> >>
> >>
> >>--
> >>PHP CVS Mailing List (http://www.php.net/)
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >--
> >PHP Development Mailing List 
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Fwd: [PHP-CVS] cvs: php4 /ext/bcmath bcmath.c/ext/bcmath/libbcmath/src bcmath.h init.c output.c raise.c raisemod.c recmul.csqrt.c str2num.c zero.c

2002-11-20 Thread Andi Gutmans
I have backups of number.c and number.h but I see them in Attic/ so it 
might be better to restore them so that we keep the history. Anyone know 
how to do it? mv Attic/number* . doesn't seem to work.

Andi

At 10:08 PM 11/20/2002 +0200, Andi Gutmans wrote:
There seems to be some bug in CVS. After I reverted this patch number.c 
and number.h from within ext/bcmath are missing. If I erase them and do a 
cvs update I don't get them anymore. I definitely didn't remove them.
Anyone have any idea?

Andi

From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Wed, 20 Nov 2002 19:48:13 -
Subject: [PHP-CVS] cvs: php4 /ext/bcmath 
bcmath.c  /ext/bcmath/libbcmath/src bcmath.h init.c output.c raise.c 
raisemod.c recmul.c sqrt.c str2num.c zero.c
X-Bogosity: No, tests=bogofilter, spamicity=0.255710, version=0.8.0

andiWed Nov 20 14:48:13 2002 EDT

  Modified files:
/php4/ext/bcmathbcmath.c
/php4/ext/bcmath/libbcmath/src  bcmath.h init.c output.c raise.c
raisemod.c recmul.c sqrt.c str2num.c
zero.c
  Log:
  - Intermediate commit which works on making bcmath thread-safe.


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Fwd: [PHP-CVS] cvs: php4 /ext/bcmath bcmath.c/ext/bcmath/libbcmath/src bcmath.h init.c output.c raise.c raisemod.c recmul.csqrt.c str2num.c zero.c

2002-11-20 Thread Andi Gutmans
There seems to be some bug in CVS. After I reverted this patch number.c and 
number.h from within ext/bcmath are missing. If I erase them and do a cvs 
update I don't get them anymore. I definitely didn't remove them.
Anyone have any idea?

Andi

From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Wed, 20 Nov 2002 19:48:13 -
Subject: [PHP-CVS] cvs: php4 /ext/bcmath 
bcmath.c  /ext/bcmath/libbcmath/src bcmath.h init.c output.c raise.c 
raisemod.c recmul.c sqrt.c str2num.c zero.c
X-Bogosity: No, tests=bogofilter, spamicity=0.255710, version=0.8.0

andiWed Nov 20 14:48:13 2002 EDT

  Modified files:
/php4/ext/bcmathbcmath.c
/php4/ext/bcmath/libbcmath/src  bcmath.h init.c output.c raise.c
raisemod.c recmul.c sqrt.c str2num.c
zero.c
  Log:
  - Intermediate commit which works on making bcmath thread-safe.


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Index: php4/ext/bcmath/bcmath.c
diff -u php4/ext/bcmath/bcmath.c:1.39 php4/ext/bcmath/bcmath.c:1.40
--- php4/ext/bcmath/bcmath.c:1.39   Sun Aug 18 00:33:10 2002
+++ php4/ext/bcmath/bcmath.cWed Nov 20 14:48:12 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: bcmath.c,v 1.39 2002/08/18 04:33:10 kalowsky Exp $ */
+/* $Id: bcmath.c,v 1.40 2002/11/20 19:48:12 andi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -65,9 +65,9 @@
 #endif
 
 /* Storage used for special numbers. */
-extern bc_num _zero_;
-extern bc_num _one_;
-extern bc_num _two_;
+extern bc_num BCG(_zero_);
+extern bc_num BCG(_one_);
+extern bc_num BCG(_two_);
 
 
 /* Make a copy of a number!  Just increments the reference count! */
@@ -81,15 +81,15 @@
 /* Initialize a number NUM by making it a copy of zero. */
 void init_num (bc_num *num)
 {
-   *num = copy_num (_zero_);
+   *num = copy_num (BCG(_zero_));
 }
 
 
 PHP_RSHUTDOWN_FUNCTION(bcmath)
 {
-   bc_free_num(&_zero_);
-   bc_free_num(&_one_);
-   bc_free_num(&_two_);
+   bc_free_num(&BCG(_zero_));
+   bc_free_num(&BCG(_one_));
+   bc_free_num(&BCG(_two_));
 
return SUCCESS;
 }
Index: php4/ext/bcmath/libbcmath/src/bcmath.h
diff -u php4/ext/bcmath/libbcmath/src/bcmath.h:1.2 
php4/ext/bcmath/libbcmath/src/bcmath.h:1.3
--- php4/ext/bcmath/libbcmath/src/bcmath.h:1.2  Sat Aug 11 12:38:18 2001
+++ php4/ext/bcmath/libbcmath/src/bcmath.h  Wed Nov 20 14:48:12 2002
@@ -80,11 +80,11 @@
 #define LONG_MAX 0x7ff
 #endif
 
-
+#define BCG(s) s##a
 /* Global numbers. */
-extern bc_num _zero_;
-extern bc_num _one_;
-extern bc_num _two_;
+extern bc_num BCG(_zero_);
+extern bc_num BCG(_one_);
+extern bc_num BCG(_two_);
 
 
 /* Function Prototypes */
Index: php4/ext/bcmath/libbcmath/src/init.c
diff -u php4/ext/bcmath/libbcmath/src/init.c:1.1 
php4/ext/bcmath/libbcmath/src/init.c:1.2
--- php4/ext/bcmath/libbcmath/src/init.c:1.1Wed Nov 22 15:20:02 2000
+++ php4/ext/bcmath/libbcmath/src/init.cWed Nov 20 14:48:12 2002
@@ -39,9 +39,9 @@
 #include "private.h"
 
 /* Storage used for special numbers. */
-bc_num _zero_;
-bc_num _one_;
-bc_num _two_;
+bc_num BCG(_zero_);
+bc_num BCG(_one_);
+bc_num BCG(_two_);
 
  bc_num _bc_Free_list = NULL;
 
@@ -105,11 +105,11 @@
 void
 bc_init_numbers ()
 {
-  _zero_ = bc_new_num (1,0);
-  _one_  = bc_new_num (1,0);
-  _one_->n_value[0] = 1;
-  _two_  = bc_new_num (1,0);
-  _two_->n_value[0] = 2;
+  BCG(_zero_) = bc_new_num (1,0);
+  BCG(_one_)  = bc_new_num (1,0);
+  BCG(_one_)->n_value[0] = 1;
+  BCG(_two_)  = bc_new_num (1,0);
+  BCG(_two_)->n_value[0] = 2;
 }
 
 
@@ -130,6 +130,6 @@
 bc_init_num (num)
  bc_num *num;
 {
-  *num = bc_copy_num (_zero_);
+  *num = bc_copy_num (BCG(_zero_));
 }
 
Index: php4/ext/bcmath/libbcmath/src/output.c
diff -u php4/ext/bcmath/libbcmath/src/output.c:1.2 
php4/ext/bcmath/libbcmath/src/output.c:1.3
--- php4/ext/bcmath/libbcmath/src/output.c:1.2  Sun Nov 26 04:34:01 2000
+++ php4/ext/bcmath/libbcmath/src/output.c  Wed Nov 20 14:48:12 2002
@@ -138,7 +138,7 @@
/* The number is some other base. */
digits = NULL;
bc_init_num (&int_part);
-   bc_divide (num, _one_, &int_part, 0);
+   bc_divide (num, BCG(_one_), &int_part, 0);
bc_init_num (&frac_part);
bc_init_num (&cur_dig);
bc_init_num (&base);
@@ -185,7 +185,7 @@
  {
(*out_char) ('.');
pre_space = 0;
-   t_num = bc_copy_num (_one_);
+   t_num = bc_copy_num (BCG(_one_));
while (t_num->n_len <= num->n_scale) {
  bc_multiply (frac_part, base, &frac_part, num->n_scale);
  fdigit = bc_num2long (frac_part);
Index: php4/ext/bcmath/libbcmath/src/raise.c
diff -u php4/ext/bcmath/libbcmath/src/raise.c:1.1 
php4/ext/bcmath/libbcmath/src/raise.c:1.2
--- php4/ext/bcmath/libbcmath/src/raise.c:1.1   Wed Nov 22 15:20:0