Commit Graph

4788 Commits

Author SHA1 Message Date
Nikita Popov
5fc9aa9a95 Make printf_to_smart_str(ing) the primitive printf operation
vs(tr)pprintf is now implemented in Zend on top of
printf_to_smart_str(int), which is provided as a utility function.

This allows us to efficiently printf to the end of a smart string.
2017-01-01 21:28:20 +01:00
Nikita Popov
c7742e280a Export zend_s(tr)pprintf
It's annoying that in Zend you have to use zend_strpprintf instead
of strpprintf, while in PHP you have to use strpprintf instead of
zend_strpprintf.

Make zend_s(tr)pprintf always available and keep s(tr)pprintf as
macro aliases.
2017-01-01 21:28:20 +01:00
Nikita Popov
38f72cea1b Sync smart_string implementation with smart_str
Switch to using inline functions instead of macros, etc.
2017-01-01 21:28:20 +01:00
Nikita Popov
abb91ee9ea Move smart_string to Zend
smart_str is already in Zend.
2017-01-01 21:28:20 +01:00
Nikita Popov
52da05c535 Merge branch 'PHP-7.1' 2017-01-01 21:17:00 +01:00
Nikita Popov
a5027d43dd Merge branch 'PHP-7.0' into PHP-7.1 2017-01-01 21:09:27 +01:00
Nikita Popov
935b5cb11e Flush stderr on win32 in cli_log_message
This allows us to unfork a bunch of tests for Windows.
2017-01-01 21:09:02 +01:00
Anatol Belski
afb6ca2566 Finish remaining replacement uint => uint32_t
Tthe core should be normalized now, no uints anymore
2016-12-22 14:32:02 +01:00
Kalle Sommer Nielsen
d4831e2d0a Eliminate win95nt.h
- Most of this is builtin php.h now
- Removed some dead defines
- We now pass /D _USE_MATH_DEFINES for M_PI etc
2016-12-22 06:51:18 +01:00
Anatol Belski
837cce3b0b move the defs to the right place 2016-12-22 02:17:55 +01:00
Anatol Belski
9bcd2bcc21 Merge branch 'PHP-7.1'
* PHP-7.1:
  Care about intput and output encoding, as per default encoding RFC
2016-12-14 03:12:46 +01:00
Anatol Belski
e33ec61f9c Care about intput and output encoding, as per default encoding RFC
If PHP CLI is used with programs with no Unicode support, the default
PHP console codepage might cause backward incompatible behaviors. This
is solved with this patch by separating the handling of I/O codepage.
As per https://wiki.php.net/rfc/default_encoding input_encodnig and
output_encoding are centralized INI settings, so they're used for the
purpose of adjusting the codepage. This gives user the ability to use
UTF-8 internally, while letting the system API to convert the output
to a compatible codepage. This also might solve the font issues on
systems without good true type support.

Note, that there no change to the default behavior - if input and
output encoding are not set, which is the default case, the default
charset applies to both console input and output. The patch is just
a compilment to the backward compatibility, not more and not less.
2016-12-14 02:51:29 +01:00
Davey Shafik
2f5090168f Bump versions and NEWS for 7.1.1-dev 2016-12-02 02:24:54 -08:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Anatol Belski
df902a7c28 move dev to next 2016-11-22 11:49:09 +01:00
Kalle Sommer Nielsen
1b5b9234a3 Remove these NetWare leftovers 2016-11-19 10:47:20 +01:00
Joe Watkins
a2bc7cf9ca Merge branch 'master' of git.php.net:/php-src 2016-11-12 17:30:41 +00:00
Andrea Faulds
3ed8b7a87b Use "Standard input code" instead of "php://stdin" 2016-11-12 17:26:20 +00:00
Andrea Faulds
a103aa2dbd Show "php://stdin" instead of "-" in error messages 2016-11-12 17:26:20 +00:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Kalle Sommer Nielsen
2de9c42f97 Remove this check as discussed with Anatol 2016-11-05 23:08:08 +01:00
Anatol Belski
100650bc5d add some float limits constants 2016-10-26 18:10:44 +02:00
Anatol Belski
277e829f10 move dev to 7.0.14 2016-10-25 10:29:51 +02:00
Stanislav Malyshev
f8be3ede4f Fix bug #73189 - Memcpy negative size parameter php_resolve_path
(cherry picked from commit da7e89cde8)
(cherry picked from commit c4c2cce37d)
2016-10-14 01:50:22 +02:00
Sara Golemon
25d4943b44 Clear FG(user_stream_current_filename) when bailing out
If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188

(cherry picked from commit 9f86cdaf7f)
2016-10-14 01:34:51 +02:00
Anatol Belski
f7aa911d9b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73189 - Memcpy negative size parameter php_resolve_path
2016-10-12 21:33:13 +02:00
Stanislav Malyshev
c4c2cce37d Fix bug #73189 - Memcpy negative size parameter php_resolve_path
(cherry picked from commit da7e89cde8)
2016-10-12 21:31:37 +02:00
Sara Golemon
9f86cdaf7f Clear FG(user_stream_current_filename) when bailing out
If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188
2016-10-11 21:46:02 -07:00
Sara Golemon
4d11a8eedf Clear FG(user_stream_current_filename) when bailing out
If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188
2016-10-11 21:44:14 -07:00
Anatol Belski
940731df04 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix datatype
2016-10-06 11:03:45 +02:00
Anatol Belski
bc5efe501e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix datatype
2016-10-06 11:03:09 +02:00
Anatol Belski
ea83e504e5 fix datatype 2016-10-06 11:01:27 +02:00
Anatol Belski
46f4470e0d ensure the flag doesn't overflow
In certain case, it could take more than just 0/1, but 2 bits should
be enough.
2016-10-06 10:18:31 +02:00
Anatol Belski
1e986c709c handle the stream->__exposed flag correctly
as it's a flag now, just set the value
2016-10-06 02:15:29 +02:00
Anatol Belski
42b7912f03 catch up with stream datatypes 2016-10-05 22:53:21 +02:00
Anatol Belski
02acb056b3 uint vs. uint32_t 2016-10-05 22:53:21 +02:00
Anatol Belski
0ca15cbeba reduce size of stream struct
32 bytes are spared on 64-bit build
2016-10-05 22:53:21 +02:00
Anatol Belski
4b41973ba1 prevent flags overflows
Sometimes int is overflown. That might still come out with a right
result, but is ofc not clean.
2016-10-05 22:53:21 +02:00
Anatol Belski
41d04079e3 reduce size of stream bucket struct by 8 bytes on 64-bit 2016-10-05 22:53:21 +02:00
Nikita Popov
e81a5a0d1b Merge branch 'PHP-7.1' 2016-09-28 19:20:30 +02:00
Nikita Popov
4c0804c07d Ensure symtable exists before checking it 2016-09-28 19:20:17 +02:00
Anatol Belski
cb29c01ed6 prepare next 2016-09-27 12:49:52 +02:00
Anatol Belski
3529f2814d Merge branch 'PHP-7.1'
* PHP-7.1:
  Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
2016-09-23 18:48:41 +02:00
Anatol Belski
90a3671c09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
2016-09-23 18:48:14 +02:00
Anatol Belski
4685297f05 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
2016-09-23 18:46:51 +02:00
Anatol Belski
075aa911ff Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
This reverts commit f9a699f6c3.
2016-09-23 18:45:03 +02:00
Anatol Belski
f9a699f6c3 Fixed bug #73037 SoapServer reports Bad Request when gzipped
(cherry picked from commit 410c68788a)
2016-09-23 18:06:12 +02:00
Anatol Belski
f59ea5d6a1 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73037 SoapServer reports Bad Request when gzipped
2016-09-23 16:08:09 +02:00
Anatol Belski
4b13f60278 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73037 SoapServer reports Bad Request when gzipped
2016-09-23 16:07:12 +02:00
Anatol Belski
410c68788a Fixed bug #73037 SoapServer reports Bad Request when gzipped 2016-09-23 16:02:50 +02:00