summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bz2/tests/with_strings.phpt2
-rw-r--r--ext/mcrypt/tests/blowfish.phpt2
-rw-r--r--ext/posix/posix.c3
-rw-r--r--ext/standard/parsedate.y24
-rw-r--r--ext/standard/tests/array/001.phpt2
-rw-r--r--ext/standard/tests/array/002.phpt2
-rw-r--r--ext/standard/tests/array/003.phpt2
-rw-r--r--ext/standard/tests/array/array_search.phpt2
-rw-r--r--ext/standard/tests/file/bug20424.phpt2
-rw-r--r--ext/standard/tests/math/abs.phpt2
-rw-r--r--ext/standard/tests/math/pow.phpt2
-rw-r--r--ext/standard/tests/math/round.phpt2
-rw-r--r--ext/standard/tests/strings/trim.phpt2
-rw-r--r--ext/standard/tests/strings/wordwrap.phpt2
14 files changed, 34 insertions, 17 deletions
diff --git a/ext/bz2/tests/with_strings.phpt b/ext/bz2/tests/with_strings.phpt
index 09f2291bb4..222b479c1b 100644
--- a/ext/bz2/tests/with_strings.phpt
+++ b/ext/bz2/tests/with_strings.phpt
@@ -23,7 +23,7 @@ $tests = <<<TESTS
\$blaat === \$blaat2
TESTS;
- include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../tests/quicktester.inc');
--EXPECT--
OK
diff --git a/ext/mcrypt/tests/blowfish.phpt b/ext/mcrypt/tests/blowfish.phpt
index c2273c165d..40bfb62e0b 100644
--- a/ext/mcrypt/tests/blowfish.phpt
+++ b/ext/mcrypt/tests/blowfish.phpt
@@ -13,7 +13,7 @@ function hex2bin($data) {
print "key plain crypt guess stat\n";
$null = "\0\0\0\0\0\0\0\0";
-$vectors = file("ext/mcrypt/tests/vectors.txt");
+$vectors = file(dirname(__FILE__) . "/vectors.txt");
$td = mcrypt_module_open ("blowfish", "", MCRYPT_MODE_ECB, "");
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 3036198235..7866b53362 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -23,17 +23,18 @@
#endif
#include "php.h"
+#include <unistd.h>
#include "ext/standard/info.h"
#include "ext/standard/php_string.h"
#include "php_posix.h"
+
#if HAVE_POSIX
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#include <unistd.h>
#include <sys/resource.h>
#include <sys/utsname.h>
#include <sys/types.h>
diff --git a/ext/standard/parsedate.y b/ext/standard/parsedate.y
index 92a750d0e2..76b2570fab 100644
--- a/ext/standard/parsedate.y
+++ b/ext/standard/parsedate.y
@@ -419,6 +419,9 @@ relunit : tUNUMBER tYEAR_UNIT {
((struct date_yy *)parm)->yyRelSeconds += $1;
}
;
+number : tUNUMBER tUNUMBER {
+ printf("%d %d\n", $1, $2);
+}
number : tUNUMBER
{
@@ -428,12 +431,25 @@ number : tUNUMBER
((struct date_yy *)parm)->yyYear = $1;
else
{
+ printf("%ull\n", $1);
if ($1>10000)
{
- ((struct date_yy *)parm)->yyHaveDate++;
- ((struct date_yy *)parm)->yyDay= ($1)%100;
- ((struct date_yy *)parm)->yyMonth= ($1/100)%100;
- ((struct date_yy *)parm)->yyYear = $1/10000;
+ if ($1 > 99999999) {
+ /* YYYYMMDDHHMMSS */
+ ((struct date_yy *)parm)->yySeconds = ($1)%100;
+ ((struct date_yy *)parm)->yyMinutes = ($1/100)%100;
+ ((struct date_yy *)parm)->yyHour = ($1/10000)%10000;
+ ((struct date_yy *)parm)->yyDay = ($1/1000000)%1000000;
+ ((struct date_yy *)parm)->yyMonth = ($1/100000000)%10000000;
+ printf("%d:%d:%d", ((struct date_yy *)parm)->yyHour, ((struct date_yy *)parm)->yyMinutes, ((struct date_yy *)parm)->yySeconds);
+/* ((struct date_yy *)parm)->yyYear = $1/10000000000; */
+ ((struct date_yy *)parm)->yyHaveDate++;
+ } else {
+ ((struct date_yy *)parm)->yyHaveDate++;
+ ((struct date_yy *)parm)->yyDay= ($1)%100;
+ ((struct date_yy *)parm)->yyMonth= ($1/100)%100;
+ ((struct date_yy *)parm)->yyYear = $1/10000;
+ }
}
else
{
diff --git a/ext/standard/tests/array/001.phpt b/ext/standard/tests/array/001.phpt
index 060367d112..3b72b331d2 100644
--- a/ext/standard/tests/array/001.phpt
+++ b/ext/standard/tests/array/001.phpt
@@ -6,7 +6,7 @@ Test array_merge and array_walk
precision=14
--FILE--
<?php
-require('ext/standard/tests/array/data.inc');
+require(dirname(__FILE__) . '/data.inc');
/*
** Create sample arrays
** Test alpha, numeric (decimal, hex, octal) and special data
diff --git a/ext/standard/tests/array/002.phpt b/ext/standard/tests/array/002.phpt
index 676554ea33..f33cf42067 100644
--- a/ext/standard/tests/array/002.phpt
+++ b/ext/standard/tests/array/002.phpt
@@ -4,7 +4,7 @@ Test arsort, asort, krsort, ksort, rsort, and sort
precision=14
--FILE--
<?php
-require('ext/standard/tests/array/data.inc');
+require(dirname(__FILE__) . '/data.inc');
function test_sort ($sort_function, $data) {
echo "\n -- Testing $sort_function() -- \n";
diff --git a/ext/standard/tests/array/003.phpt b/ext/standard/tests/array/003.phpt
index baca8d4055..f307186553 100644
--- a/ext/standard/tests/array/003.phpt
+++ b/ext/standard/tests/array/003.phpt
@@ -4,7 +4,7 @@ Test usort, uksort and uasort
precision=14
--FILE--
<?php
-require('ext/standard/tests/array/data.inc');
+require(dirname(__FILE__) . '/data.inc');
function cmp ($a, $b) {
is_array ($a)
diff --git a/ext/standard/tests/array/array_search.phpt b/ext/standard/tests/array/array_search.phpt
index 9c21de94e4..e95fda1286 100644
--- a/ext/standard/tests/array/array_search.phpt
+++ b/ext/standard/tests/array/array_search.phpt
@@ -17,7 +17,7 @@ TRUE === in_array('a', \$arr1)
'key'=== array_search('d', \$arr4)
TESTS;
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
--EXPECT--
OK
diff --git a/ext/standard/tests/file/bug20424.phpt b/ext/standard/tests/file/bug20424.phpt
index 0352d46f8e..daf1af6aca 100644
--- a/ext/standard/tests/file/bug20424.phpt
+++ b/ext/standard/tests/file/bug20424.phpt
@@ -4,7 +4,7 @@ Bug #20424: stream_get_meta_data craches on a normal file stream
--GET--
--FILE--
<?php
-$f = fopen("run-tests.php", "r");
+$f = fopen(dirname(__FILE__) . "/../../../../run-tests.php", "r");
$dummy = var_export(stream_get_meta_data($f), TRUE);
echo "I'm alive!\n";
?>
diff --git a/ext/standard/tests/math/abs.phpt b/ext/standard/tests/math/abs.phpt
index e4e5587897..3b70e7dc47 100644
--- a/ext/standard/tests/math/abs.phpt
+++ b/ext/standard/tests/math/abs.phpt
@@ -20,7 +20,7 @@ $tests = <<<TESTS
-(LONG_MIN+1) === abs(LONG_MIN+1)
TESTS;
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
--EXPECT--
1,1,0,0
OK
diff --git a/ext/standard/tests/math/pow.phpt b/ext/standard/tests/math/pow.phpt
index 12170f4f3a..deda5a94b0 100644
--- a/ext/standard/tests/math/pow.phpt
+++ b/ext/standard/tests/math/pow.phpt
@@ -143,7 +143,7 @@ LONG_MIN*LONG_MIN ~== pow(LONG_MIN,2.0)
TESTS;
echo "On failure, please mail result to php-dev@lists.php.net\n";
- include('tests/quicktester.inc');
+ include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
--EXPECT--
1,1,0,0
diff --git a/ext/standard/tests/math/round.phpt b/ext/standard/tests/math/round.phpt
index 49eabed606..23032e906c 100644
--- a/ext/standard/tests/math/round.phpt
+++ b/ext/standard/tests/math/round.phpt
@@ -33,7 +33,7 @@ $tests = <<<TESTS
LONG_MAX ~== floor(LONG_MAX + 0.5)
TESTS;
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
--EXPECT--
1,1,0,0
OK
diff --git a/ext/standard/tests/strings/trim.phpt b/ext/standard/tests/strings/trim.phpt
index 881064d7e4..c4f5860e2f 100644
--- a/ext/standard/tests/strings/trim.phpt
+++ b/ext/standard/tests/strings/trim.phpt
@@ -23,7 +23,7 @@ $tests = <<<TESTS
"ABC" === trim("ABC\\x50\\xC1\\x60\\x90","\\x50..\\xC1")
TESTS;
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
--EXPECT--
OK
diff --git a/ext/standard/tests/strings/wordwrap.phpt b/ext/standard/tests/strings/wordwrap.phpt
index 3fc8f1d880..eb85d32dc9 100644
--- a/ext/standard/tests/strings/wordwrap.phpt
+++ b/ext/standard/tests/strings/wordwrap.phpt
@@ -31,7 +31,7 @@ $tests = <<<TESTS
TESTS;
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
--EXPECT--
OK