Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard pack.c /ext/standard/tests/strings pack.phpt

2007-04-13 Thread Antony Dovgal

On 04/13/2007 06:17 AM, Brian Shire wrote:
FYI: Reverted my bad pack test changes, just verified that the latest  
gcc-4.2 branch on Darwin returns 0 rather than -1 for the following  
code:


#include stdio.h

int main() {
 double foo = (double)4294967296LL;
 printf(%d\n, (unsigned long)(foo));
}


Thanks!

--
Wbr, 
Antony Dovgal


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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard pack.c /ext/standard/tests/strings pack.phpt

2007-04-12 Thread Brian Shire


FYI: Reverted my bad pack test changes, just verified that the latest  
gcc-4.2 branch on Darwin returns 0 rather than -1 for the following  
code:


#include stdio.h

int main() {
double foo = (double)4294967296LL;
printf(%d\n, (unsigned long)(foo));
}

- Shire
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard pack.c /ext/standard/tests/strings pack.phpt

2007-04-10 Thread Antony Dovgal

On 04/03/2007 11:50 PM, Brian Shire wrote:

shire   Tue Apr  3 19:50:40 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard	pack.c 
/php-src/ext/standard/tests/strings	pack.phpt 
  Log:

  correction for previous fix to bug #38770 (pack/unpack is broken on 64bit)
  fix pack test, correct space to tabs


Brian, this breaks the test on Linux/FreeBSD i386.
Though somehow it's working on Mac/PPC.


diff -u php-src/ext/standard/tests/strings/pack.phpt:1.1.2.2 
php-src/ext/standard/tests/strings/pack.phpt:1.1.2.3
--- php-src/ext/standard/tests/strings/pack.phpt:1.1.2.2Sat Dec 30 
02:00:51 2006
+++ php-src/ext/standard/tests/strings/pack.phptTue Apr  3 19:50:40 2007
@@ -145,7 +145,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (
@@ -185,7 +185,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (
@@ -233,7 +233,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (
@@ -305,7 +305,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (




--
Wbr, 
Antony Dovgal


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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard pack.c /ext/standard/tests/strings pack.phpt

2007-04-10 Thread Brian Shire


Yeah, discussed briefly with Jani and Ilia.  I can revert it (or  
temporarily remove those lines of the test) until I can figure out  
why this doesn't work on Linux if you like?  On Darwin the code intval 
(4294967296) will return -1, while on other systems it appears to be  
0.  I can reproduce this on the C level by replicating the double- 
long cast that's happening within PHP.  Any suggestions on this  
would be welcome.


Antony, you said below that you tested on PPC?  Seems like this is a  
Darwin specific problem then (I tested on Darwin/Intel), perhaps I  
should just remove those tests for Darwin for the time being?


Thanks,

-shire

On Apr 10, 2007, at 2:34 PM, Antony Dovgal wrote:


On 04/03/2007 11:50 PM, Brian Shire wrote:

shire   Tue Apr  3 19:50:40 2007 UTC
  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard	pack.c /php-src/ext/standard/tests/ 
strings	pack.phpt   Log:
  correction for previous fix to bug #38770 (pack/unpack is broken  
on 64bit)

  fix pack test, correct space to tabs


Brian, this breaks the test on Linux/FreeBSD i386.
Though somehow it's working on Mac/PPC.

diff -u php-src/ext/standard/tests/strings/pack.phpt:1.1.2.2 php- 
src/ext/standard/tests/strings/pack.phpt:1.1.2.3
--- php-src/ext/standard/tests/strings/pack.phpt:1.1.2.2	Sat Dec  
30 02:00:51 2006
+++ php-src/ext/standard/tests/strings/pack.phpt	Tue Apr  3  
19:50:40 2007

@@ -145,7 +145,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (
@@ -185,7 +185,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (
@@ -233,7 +233,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (
@@ -305,7 +305,7 @@
 )
 Array
 (
-[1] = 0
+[1] = -1
 )
 Array
 (



--
Wbr, Antony Dovgal


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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard pack.c /ext/standard/tests/strings pack.phpt

2007-04-10 Thread Antony Dovgal

On 04/11/2007 02:45 AM, Brian Shire wrote:
Yeah, discussed briefly with Jani and Ilia.  I can revert it (or  
temporarily remove those lines of the test) until I can figure out  
why this doesn't work on Linux if you like?  On Darwin the code intval 
(4294967296) will return -1, while on other systems it appears to be  
0.  I can reproduce this on the C level by replicating the double- 
 long cast that's happening within PHP.  Any suggestions on this  
would be welcome.


Well, if it's just this Darwin/Intel difference then it's not that critical, I 
believe.

Antony, you said below that you tested on PPC?  Seems like this is a  
Darwin specific problem then (I tested on Darwin/Intel), perhaps I  
should just remove those tests for Darwin for the time being?


Let me see if I can reproduce it on Darwin/Intel, that'll take some time..

--
Wbr, 
Antony Dovgal


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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard pack.c /ext/standard/tests/strings pack.phpt

2007-04-10 Thread Brian Shire


On Apr 10, 2007, at 3:56 PM, Antony Dovgal wrote:


On 04/11/2007 02:45 AM, Brian Shire wrote:
Yeah, discussed briefly with Jani and Ilia.  I can revert it (or   
temporarily remove those lines of the test) until I can figure  
out  why this doesn't work on Linux if you like?  On Darwin the  
code intval (4294967296) will return -1, while on other systems it  
appears to be  0.  I can reproduce this on the C level by  
replicating the double-  long cast that's happening within PHP.   
Any suggestions on this  would be welcome.


Well, if it's just this Darwin/Intel difference then it's not that  
critical, I believe.
Antony, you said below that you tested on PPC?  Seems like this is  
a  Darwin specific problem then (I tested on Darwin/Intel),  
perhaps I  should just remove those tests for Darwin for the time  
being?


Let me see if I can reproduce it on Darwin/Intel, that'll take some  
time..




Thanks, I can reproduce and so can Ilia on Darwin/Intel so if you're  
getting a -1 on Darwin/PPC too then it tells me it's probably some  
silly Darwin difference/bug rather than a 64-bit extension problem on  
the Intel 2 Duo chips.  If someone has Linux/non-Darwin OS on an  
Intel 2 Duo chip that would be informative as well.



- Shire
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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