Commit Graph

174 Commits

Author SHA1 Message Date
Anatol Belski
69c2e53419 no more winxp, but really 2015-04-04 20:39:04 +02:00
Anatol Belski
184793b5c1 fix condition 2015-03-19 22:33:16 +01:00
Anatol Belski
f43cc2a19a use portable fseek 2015-03-11 21:46:37 +01:00
Dmitry Stogov
6d065a8545 Avoid repeatable strlen() calls 2015-03-05 18:18:39 +03:00
Dmitry Stogov
2fa8d67a5c Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse. 2015-03-04 02:05:28 +03:00
Stanislav Malyshev
c752e1b786 Merge branch 'pull-request/1032'
* pull-request/1032:
  do_fstat changes
2015-02-01 00:56:27 -08:00
Stanislav Malyshev
50703c900f Merge branch 'PHP-5.6'
* PHP-5.6:
  fix group name handling

Conflicts:
	main/streams/plain_wrapper.c
2015-01-31 23:48:08 -08:00
Stanislav Malyshev
c5526291ce Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix group name handling
2015-01-31 23:47:25 -08:00
Joshua Rogers
f8bf646fc4 do_fstat changes
Check return values of 'do_fstat' function in all places.
2015-02-01 18:47:09 +11:00
Stanislav Malyshev
e5e251b023 fix group name handling 2015-01-31 23:47:03 -08:00
Michael Wallner
570ed1a1a4 fix warnings 2015-01-30 22:32:00 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
49de5b7aed Merge branch 'PHP-5.6'
* PHP-5.6:
  add include for missing usleep proto
  C89 compat
  Added more useful warning messages
  Changed based on comments and make its behaviour equal to the Windows version
  Fix #53092 - dns_get_record does not return false on dns server failure
  Fix php cli (-S option) inconsistent port parsing

Conflicts:
	main/streams/plain_wrapper.c
2014-12-01 08:32:12 +01:00
Anatol Belski
c370683903 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  add include for missing usleep proto
  C89 compat
  Added more useful warning messages
  Changed based on comments and make its behaviour equal to the Windows version
  Fix #53092 - dns_get_record does not return false on dns server failure
  Fix php cli (-S option) inconsistent port parsing
2014-12-01 08:30:59 +01:00
Anatol Belski
c1ec815fae add include for missing usleep proto 2014-12-01 08:27:46 +01:00
Anatol Belski
f4a0e601ee C89 compat 2014-12-01 08:24:44 +01:00
Stanislav Malyshev
b564e7b0de Merge branch 'PHP-5.6'
* PHP-5.6:
  Update NEWS
  fix typo
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:35:11 -08:00
Stanislav Malyshev
60d5b2ec24 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:07:02 -08:00
mcq8
04808aa7e1 Added test and review suggestion 2014-11-30 16:38:20 -08:00
mcq8
6eaa4d01d3 Fix bug #68335: rmdir doesnt work with file:// stream wrapper 2014-11-30 16:38:13 -08:00
Anatol Belski
5400f92c75 proper dllexport 2014-11-18 15:38:35 +01:00
Anatol Belski
deaeca4000 fix datatype mismatches 2014-10-27 17:15:26 +01:00
Anatol Belski
74997dcf7e add include for usleep() proto 2014-10-23 16:49:47 +02:00
Anatol Belski
b428dc761d Merge branch 'PHP-5.6'
* PHP-5.6:
  increase the polling period to not to break existing behaviours
2014-09-29 17:29:00 +02:00
Anatol Belski
231a311ecb Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  increase the polling period to not to break existing behaviours
2014-09-29 17:28:27 +02:00
Anatol Belski
46aa2c396b increase the polling period to not to break existing behaviours 2014-09-29 17:27:24 +02:00
Anatol Belski
78e23758b7 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever

Conflicts:
	main/streams/plain_wrapper.c
2014-09-29 16:30:40 +02:00
Anatol Belski
87a37f4090 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #51800 proc_open on Windows hangs forever
2014-09-29 16:27:33 +02:00
Anatol Belski
0c982798e0 Fixed bug #51800 proc_open on Windows hangs forever
This loop can block for some minutes, theoretically. Practially
however, this is a 99% non issue for a normal use case. This is
required because read() is synchronous. The PHP streams API wants
to fill its internal buffers, therefore it might try to read some
more data than user has demanded. Also, for a case where we want
to read X bytes, but neither enough data nor EOF arrives, read()
will block until it could fill the buffer. If a counterpart station
runs slowly or delivers not all the data at once, read() would
still be waiting. If we quit too early, we possibly could loose
some data from the pipe. Thus it has to emulate the read()
behaviour, but obviously not completely, just to some grade.

Reading big data amount is for sure an issue on any platforms, it
depends on the pipe buffer size, which is controlled by the system.
On Windows, the buffer size seems to be way too small, which causes
buffer congestion and a dead lock. It is essential to read the pipe
descriptors simultaneously and possibly in the same order as the
opposite writes them.

Thus, this will work with smaller buffer data sizes passed through
pipes. As MSDN states, anonymous pipes don't support asynchronous
operations. Neither anonymous pipes do support select() as they are
not SOCKETs but file descriptors. Consequently - bigger data sizes
will need a better solution based on threads. However it is much
more expencive. Maybe a better solution could be exporting a part
of the internal doing as a userspace function which could perform
some kind of lookahead operation on the pipe descriptor.

This is just the first stone, depending on the user feedback we
might go for further improvements in this area.
2014-09-29 16:24:34 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
6a92d32105 fix type 2014-09-14 14:43:39 +02:00
Anatol Belski
455741fce3 master renames phase 4 2014-08-25 20:57:25 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Michael Wallner
deee0011e1 restore API compatibility 2014-07-03 20:40:41 +02:00
Michael Wallner
438b6c5258 finish 2014-07-03 20:40:40 +02:00
Michael Wallner
11e401ab59 refactor _php_stream_fopen_{temporary_,tmp}file() 2014-07-03 20:40:40 +02:00
Anatol Belski
62f6c5853f Fixes to various stream cast on win64
This fixes further issues on win64 with casts from the streams.
Sockets/descriptors handling was unitized. This has an impact only on
win64, php_socket_t otherwise can be feed back to int datatype.
2014-03-19 06:33:46 +01:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Michael Wallner
9ea2489f5c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #61645 (fopen and O_NONBLOCK)
  fix possibly uninitialized value
2013-12-06 10:33:47 +01:00
Michael Wallner
a48d82d238 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61645 (fopen and O_NONBLOCK)
  fix possibly uninitialized value
2013-12-06 10:33:10 +01:00
Michael Wallner
b5f5bff965 Fixed bug #61645 (fopen and O_NONBLOCK)
if a mode like "rn" was passed to fopen(), then
php_stream_parse_fopen_modes() would assign O_WRONLY to
flags, because O_NONBLOCK tainted flags for the r/w/+ check
2013-12-06 10:29:24 +01:00
Anatol Belski
cf6ab0e915 applied and fixed the original patch
initial work on the patch import done
2013-10-17 10:40:43 +02:00
Andrey Hristov
92d27ccb05 Constify streams API and a few other calls down the rabbit hole.
(`char *` to `const char *` for parameters and few return values)
In a few places int len moved to size_t len.
2013-07-30 12:49:36 +02:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00