Commit Graph

2304 Commits

Author SHA1 Message Date
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Christoph M. Becker
e720fb7565 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix ZTS issue regarding new Windows CTRL handling API
2019-06-01 09:36:25 +02:00
Christoph M. Becker
637d8677b3 Fix ZTS issue regarding new Windows CTRL handling API
php_win32_signal_system_ctrl_handler() is called from a kernel thread,
so the former initialization of `vm_interrupt_flag` has no effect,
since it is defined as thread-local.  This is, however, not necessary,
since the CTRL signal handling is supposed to work only for the main
thread anyway.  We therefore change `vm_interrupt_flag` and the related
variables to true globals.

This also allows us to unmark the respective test case as XFAIL.

Furthermore, `vm_interrupt_flag` is declared as `zend_bool *`, so we
better treat it such.
2019-06-01 09:35:47 +02:00
Joe Watkins
3518c4dfe9
Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Rename *.l files to *.re"
2019-05-20 06:07:03 +02:00
Joe Watkins
e11233dc49
Revert "Rename *.l files to *.re"
This reverts commit 969047749d.
2019-05-20 06:06:38 +02:00
Peter Kokot
0a7d71b593 Merge branch 'PHP-7.4'
* PHP-7.4:
  Rename *.l files to *.re
2019-05-17 23:54:12 +02:00
Peter Kokot
969047749d Rename *.l files to *.re
This syncs PHP lexer files to all use *.re extension. The *.re files are
processed with the RE2C tool.
2019-05-17 23:53:03 +02:00
Peter Kokot
3e86050726 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused symbol definition
  Remove redundant memory.h file
2019-05-11 19:48:13 +02:00
Peter Kokot
9219e56063 Remove redundant memory.h file
The memory.h file is part of the pre-C89 era and is on today's systems
only a simple wrapper for including the final string.h header file.
2019-05-11 19:47:54 +02:00
Christoph M. Becker
bcefc345bd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix erroneous assertions
2019-05-09 16:57:23 +02:00
Christoph M. Becker
d0d290d4aa Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix erroneous assertions
2019-05-09 16:56:57 +02:00
Christoph M. Becker
fd1ffa4692 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix erroneous assertions
2019-05-09 16:55:35 +02:00
Christoph M. Becker
27f168cf63 Fix erroneous assertions
Since PHP strings are binary safe (i.e. they may contain NUL bytes), we
must not assume that strlen()/wcslen() actually return the length of
the string.  Only if the given in_len is zero, it is safe to assert
this.
2019-05-09 16:54:11 +02:00
Stanislav Malyshev
97c728116c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77821: Potential heap corruption in TSendMail()
2019-04-29 22:10:21 -07:00
Stanislav Malyshev
f7d59844e1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77821: Potential heap corruption in TSendMail()
2019-04-29 22:09:15 -07:00
Stanislav Malyshev
506a764089 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77821: Potential heap corruption in TSendMail()
2019-04-29 22:09:10 -07:00
Stanislav Malyshev
2c3933821f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #77821: Potential heap corruption in TSendMail()
2019-04-29 22:09:04 -07:00
Christoph M. Becker
6c631ccfef Fix #77821: Potential heap corruption in TSendMail()
`zend_string_tolower()` returns a copy (not a duplicate) of the given
string, if it is already in lower case.  In this case we must not not
`zend_string_free()` both strings.  The cleanest solution is to call
` zend_string_release()` on both strings, which properly handles the
refcount.
2019-04-29 22:08:19 -07:00
Peter Kokot
fea3b011bb Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove php.gif from the project root directory
2019-04-23 08:59:55 +02:00
Peter Kokot
24cd183fdf Merge branch 'pull-request/4046' into PHP-7.4
* pull-request/4046:
  Remove php.gif from the project root directory
2019-04-23 08:59:44 +02:00
Christoph M. Becker
b8e0f506b5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix parameter order
2019-04-22 12:39:12 +02:00
Christoph M. Becker
6710929c04 Fix parameter order
The parameter order of `php_sys_link()` should be identical on Windows
and POSIX, bug commit c9861bd[1] got that wrong.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=c9861bd7a974ef1555395b879c1035a0bbc12ef1>
2019-04-22 12:38:24 +02:00
Peter Kokot
aff1a927d9 Remove php.gif from the project root directory
The PHP logo is also displayed in the main README.md file using a shiny
SVG format so there is no need to use GIF format.
2019-04-21 03:20:47 +02:00
Peter Kokot
57cfd706e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_READDIR_R_TYPE
2019-04-13 04:51:03 +02:00
Peter Kokot
769db42341 Remove PHP_READDIR_R_TYPE
The PHP_READDIR_R_TYPE m4 macro has been removed via
2b28f71891.

HAVE_POSIX_READDIR_R in windows header file is also not needed anymore.
2019-04-13 04:50:05 +02:00
Anatol Belski
5477d68300 Fix potential OPcache file cache related issues
To solve issues detected during testing, we backport the following
commits to PHP 7.2:

129c5c1181
9ac133a0b3
ce72bc6b65
2019-04-11 18:28:49 +02:00
Nikita Popov
6960ea99ac Merge branch 'PHP-7.4' 2019-04-11 16:57:46 +02:00
Nikita Popov
2b28f71891 Use readdir() instead of readdir_r()
readdir_r() is deprecated in modern glibc versions. readdir() is
thread safe in practice, as long as there are no concurrent accesses
on the *same* directory stream.
2019-04-11 16:52:36 +02:00
Anatol Belski
0d91b046a3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Ensure double slashes are replaced by the path normalization
2019-04-10 15:47:57 +02:00
Anatol Belski
d207c9a78a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Ensure double slashes are replaced by the path normalization
2019-04-10 15:47:36 +02:00
Anatol Belski
ce72bc6b65 Ensure double slashes are replaced by the path normalization 2019-04-10 15:20:36 +02:00
Peter Kokot
e6f86fb17c Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove checks for locale.h, setlocale, localeconv
2019-04-07 18:34:02 +02:00
Peter Kokot
e06836a1a3 Remove checks for locale.h, setlocale, localeconv
The `<loccale.h>` header file, setlocale, and localeconv are part of the
standard C89 [1] and on current systems can be used unconditionally.

Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`,
`HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in
configure.ac [2] can be ommitted and simplifed.

The bundled libmagic (file) has also been patched already in version
5.35 and up in upstream location so when it will be patched also in
php-src the check for locale.h header is still left in the configure.ac
and in windows headers definition file.

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

Omit the bundled libmagic files
2019-04-07 18:32:54 +02:00
Peter Kokot
06fc66ed7c Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor AC_INIT in configure.ac and PHP versions
2019-04-07 05:54:12 +02:00
Peter Kokot
afd52f9d99 Refactor AC_INIT in configure.ac and PHP versions
Since Autoconf 2.53 the AC_INIT call with only a single argument has
been made obsolete and now includes several other optional arguments to
make installation experience a bit better by providing program version
and links to the project in the `./configure -h` output. This patch also
updates win build version. The phpize.m4 AC_INIT has been updated with
the call without arguments.
2019-04-07 05:52:14 +02:00
Christoph M. Becker
dbf3b7ce09 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix ASAN configuration
2019-04-06 17:39:20 +02:00
Christoph M. Becker
3393ae6e77 Fix ASAN configuration
Commit 6a624c1[1] mostly replaced `COMPILER_NAME` with
`COMPILER_NAME_LONG` and `COMPILER_NAME_SHORT`, but not all
occurrences, what broke the Clang ASAN configuration.  We fix this by
getting rid of `COMPILER_NAME` altogether.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=6a624c1dfda0dbfaaff3e453e6cb58de12748fb3>
2019-04-06 17:38:18 +02:00
Anatol Belski
d8628e941f Merge branch 'PHP-7.4'
* PHP-7.4:
  Improve ascii check
2019-04-01 02:17:40 +02:00
Anatol Belski
1686c3fa47 Improve ascii check 2019-04-01 02:16:52 +02:00
Anatol Belski
bf78142295 Merge branch 'PHP-7.4'
* PHP-7.4:
  Rework conditions and make them more future proof
2019-03-31 22:11:54 +02:00
Anatol Belski
f7b053f5da Rework conditions and make them more future proof 2019-03-31 22:10:56 +02:00
Anatol Belski
4e4bb56d6c Merge branch 'PHP-7.4'
* PHP-7.4:
  Implement stricter CRT check
2019-03-31 17:34:06 +02:00
Anatol Belski
dd0aca0c11 Implement stricter CRT check
This aligns with the recommendations about VS2015, VS2017 and VS2019
compatibility.

More info below
https://devblogs.microsoft.com/cppblog/cpp-binary-compatibility-and-pain-free-upgrades-to-visual-studio-2019/
2019-03-31 17:33:36 +02:00
Anatol Belski
027e733e69 Merge branch 'PHP-7.4'
* PHP-7.4:
  Rework the VS version evaluation
  Implement stricter extension compatibility check
2019-03-31 14:27:02 +02:00
Anatol Belski
6a624c1dfd Rework the VS version evaluation
For the latest versions, refer also to the Visual Studio version, not to
the exact toolset version. The latest Visual Studio versions are moving
fast and the method existed previously is not sutable to keep up
anymore. Instead of refering to the exact toolset, it refers to the
Visual Studio version and implies the latest toolset available there.
That is still not ideal, another situation can arise where VS version is
not changed, but the toolset version is. It might be better to refer to
it a generic way in the future or even omit at all, and improve the
internal compatibility checks instead.
2019-03-31 14:26:00 +02:00
Anatol Belski
ddce7ada4c Implement stricter extension compatibility check
This hardens the dynamic module loading by checking the linker compatibility
between the core and the dynamic module. This likely should be extended
for the CRT as well, as 2015, 2017 and 2019 versions of Visual Studio
all have same DLL name for the CRT.
2019-03-31 14:26:00 +02:00
Anatol Belski
059423a665 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix memory leak
2019-03-30 21:31:54 +01:00
Anatol Belski
4d028a9ee9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix memory leak
2019-03-30 21:30:48 +01:00
Anatol Belski
a2c87c7f29 Fix memory leak 2019-03-30 21:28:51 +01:00
Anatol Belski
00bb4ecb77 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use wchar_t as native type in C
2019-03-30 21:09:33 +01:00
Anatol Belski
22091084fa Use wchar_t as native type in C 2019-03-30 21:08:03 +01:00
Peter Kokot
d31a40dbcd Merge branch 'PHP-7.4'
* PHP-7.4:
  Join README.GIT-RULES and CONTRIBUTING.md
2019-03-30 16:01:53 +01:00
Peter Kokot
a8e879c53f Join README.GIT-RULES and CONTRIBUTING.md
This patch joins two very much related pieces of docs together in a
single file dedicated to all sorts of contributing info.

Some more changes:
- Branches info copied from the current master branch
- LXR and bonsai info removed
- Duplicated info reduced a bit
- Security branch updated to 7.1
- Refactor intro for Git commit rules
- Updated README.GIT-RULES file usage in win32/build/confutils.js
- Refactored configure.ac
2019-03-30 15:58:23 +01:00
Anatol Belski
83c0f43fc8 No need for scoping anymore 2019-03-30 11:06:40 +01:00
Christoph M. Becker
8c9d8c3f66 Avoid unnecessary global variable 2019-03-18 15:57:27 +01:00
Christoph M. Becker
7cdb232e37 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add bison version check to configure
2019-03-18 15:05:19 +01:00
Christoph M. Becker
7ef2fa6d0d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add bison version check to configure
2019-03-18 15:04:09 +01:00
Christoph M. Becker
f21c054903 Add bison version check to configure
Since we're already checking for the minimum required re2c version,
also checking for the minimum required bison version is sensible.
2019-03-18 15:02:52 +01:00
Peter Kokot
ccc29473ec Sync AC_CHECK_SIZEOF m4 macro calls
- AC_CHECK_SIZEOF is now called mostly only in PHP_CHECK_STDINT_TYPES()
  macro except for some parts checking for the 32 or 64 bit architecture.
- SIZEOF_CHAR removed since it is always 1
- ZEND_BIN_ID is now of a more logical pattern `BIN_48888` on 64bit
  architectures and `BIN_44444` on 32bit instead of literal string
  `BIN_SIZEOF_CHAR48888` on 64bit and `BIN_SIZEOF_CHAR44444` on 32bit.
  The unneeded SIZEOF_CHAR part has been removed.
- XMLRPC_TYPE_CHECKS removed
- The `long long int` is the same as `long long` and redundant checks
  removed accordingly.
- Removed PHP_CHECK_64BIT macro. Checking if current platform is 64bit
  or not can be also done simply by using a check of the long type on
  place. This removes redundant m4 macro PHP_CHECK_64BIT.
2019-03-18 02:11:23 +01:00
Peter Kokot
97d25c87d2 Clean build system
Changes:
- AC_TYPE_SIZE_T called on only one place (configure.ac)
- AC_FUNC_ALLOCA called on only one place (configure.ac)
- AC_TYPE_UID_T called on only one place (configure.ac)
- HAVE_STRSTR removed since strstr is part of C89 standard [1]
- Remove checks for strtol and strpbrk
- Checking for the presence of perror function is not needed anymore
  since it is part of C89 standard and PHP calls it unconditionally.
- Checking for functions strdup, setenv, strerror, and memmove done only
  on one place (configure.ac)
- outdated check for snprintf removed

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 20:20:12 +01:00
Peter Kokot
3a857852a8 Remove HAVE_STRFTIME
Function strftime is part of the C89 standard [1] and current systems
don't need to check for its presence anymore.

Additionally, checks for strftime function in tests have been removed
since the PHP strftime function is now always available.

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 19:42:29 +01:00
Joe Watkins
6529d7acd9
zend_weakrefs 2019-03-12 00:35:35 +01:00
Anatol Belski
a526a6b4c1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Die hard if mc.exe or mt.exe not found
2019-03-11 20:59:51 +01:00
Anatol Belski
95c8f67a4c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Die hard if mc.exe or mt.exe not found
2019-03-11 20:59:23 +01:00
Anatol Belski
6814ba11bc Die hard if mc.exe or mt.exe not found
Even configure would pass, that producess quite subtle build errors
which are better to avoid at configure stage already.
2019-03-11 20:41:45 +01:00
c9s
9f6f6fe219 Remove function_table var from the caller
function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL
2019-03-11 10:00:39 +01:00
johnstevenson
b37a6aafce Fix bc break in Windows readlink
GetFinalPathNameByHandleW is given a file handle to a symbolic link,
rather than one to the target, and therefore returns an incorrect path.

Fix symlink with relative path and add test
2019-03-10 15:48:31 +01:00
Anatol Belski
44b7126c6d Don't use Opcache with the master test process
Additionally, enable opcache.file_cache to mitigate possible reattach
failures in the tests.
2019-03-10 13:56:32 +01:00
Peter Kokot
2957326956 Refactor README.md file
- Initial refactorings of the README.md file with some more user
  oriented information about the php-src repository and PHP in general.
- SVG logo added
- README.WIN32-BUILD-SYSTEM file contents moved to README.md
- INSTALL file contents moved to README.md
- Windows releases now instead of install.txt file ship with the
  README.md.
- A brief installation section added with help options mentioned for the
  configure and make.
- Also mentioned the `-j` option for build and tests

Co-authored-by: Javier Eguiluz <javier.eguiluz@gmail.com>
Co-authored-by: Gabriel Caruso <carusogabriel34@gmail.com>
Co-authored-by: Matthias Kaschubowski <nihylum@gmail.com>
2019-03-07 01:57:53 +01:00
Peter Kokot
a8c3e22d23 Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes:
- PHP_TM_GMTOFF removed
- HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF
- HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE
- HAVE_TZNAME removed

The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS
that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the
HAVE_TM_ZONE.

The HAVE_TZNAME symbol is not used in current code. The obsolete
HAVE_TM_ZONE symbol has been replaced with more proper
HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE
macro.
2019-03-04 12:13:12 +01:00
Peter Kokot
a700451706 Remove obsolescent AC_HEADER_STDC and memcpy check
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_STDC`.

This macro checks if given system has C89 compliant header files such
as `<string.h>`, `<stdlib.h>`, `<stdarg.h>`, `<float.h>`,... and defines
the `STDC_HEADERS` symbol [2]. Case is that current systems should be
well supported with at least C89 standard headers [3].

Given headers are still additionally checked with the `AC_PROG_CC`
macro, yet not needed anyway.

Additionally, the HAVE_MEMCPY check has been removed. The memcpy
function is standardized by C89 and later.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
[3] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
2019-03-01 19:22:44 +01:00
Peter Kokot
5cf570c914 Remove unused PHP_AC_BROKEN_SNPRINTF m4 macro
The snprintf function is part of the C99 standard and newer systems in
most cases all support it as defined in the standard. However, some old
Windows and HP-UX systems the function behaves differently. These checks
were also removed and PHP now uses a replacement for the snprintf
function. With gradual transition to C99 usage as a minimum requirement,
it will also be able to be replaced to system's snprintf function
directly.

Additionally in this context the unused HAVE_VSNPRINTF and check for
vsnprintf have been removed. PHP uses its own vsnprintf implementation
for now until more reliable C99 compliant function can be used from the
C libraries.
2019-02-27 21:20:30 +01:00
Peter Kokot
b33fa18eab Remove unused PHP_AC_BROKEN_SPRINTF and AC_ZEND_BROKEN_SPRINTF
The sprintf function has been normalized to php_sprintf via
61364b5bb1.

This patch removes the checks to make a custom sprintf function

The ZEND_BROKEN_SPRINTF has been removed and the
hardcoded #define zend_sprintf sprintf is used.

The php_sprintf and zend_sprintf are now symbols to sprintf.

This patch now removes the custom PHP definitions of the php_sprintf and
zend_sprintf functions in favor of the C99 sprintf which is also
standardized in C89 already. Once, on some systems sprintf didn't behave
in same way.
2019-02-23 22:26:47 +01:00
Peter Kokot
3068a32cd0 Sync header and footer with the rest of the files
- Local variables for editors have been removed
- Copyright year ranges can be also simplified
2019-02-18 18:16:07 +01:00
Anatol Belski
877ce69b30 Fix 32-bit build 2019-02-11 10:24:16 -08:00
Anatol Belski
2ca3becd17 Fix TS build, ref #77377 2019-02-08 18:42:48 -08:00
Anatol Belski
12bfd9a5f5 Implement FR #77377 handle CTRL+C in Windows 2019-02-08 18:10:31 -08:00
Peter Kokot
c245898bfa Update and fix remaining year ranges (2019)
This patch follows previous license year ranges updates. With new
approach source code files now have simplified headers with license
information without year ranges.
2019-02-08 23:14:29 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Christoph M. Becker
9a497f5c10 Merge branch 'PHP-7.3'
* PHP-7.3:
  Drop deprecated /Gm compile option
2018-12-30 14:37:31 +01:00
Christoph M. Becker
42b0bbd758 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Drop deprecated /Gm compile option
2018-12-30 14:37:04 +01:00
Christoph M. Becker
20de58f51d Drop deprecated /Gm compile option
The `/Gm` option of `cl` is deprecated[1], and `cl` claims that it will
be removed in the future, so we're dropping it right away.

[1] <https://docs.microsoft.com/en-us/cpp/build/reference/gm-enable-minimal-rebuild?view=vs-2017>
2018-12-30 14:36:05 +01:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
03f3b8479b Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:51:01 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
be2ddc6b65 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:23:52 +02:00
Peter Kokot
85290bbfcc Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:23:20 +02:00
Peter Kokot
2aa897476f Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:22:30 +02:00
Peter Kokot
3f72c77ce4 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:21:27 +02:00
Christoph M. Becker
6083a387a8 Unbundle libsqlite3
Since there is no need to patch libsqlite3 for our purposes, and since
libsqlite3 ≥ 3.3.9 (which is our current requirement) is widely
available on distros, there is no reason anymore to bundle the library.

Besides removing the bundled libsqlite, and adapting the configuration
respectively, we also fix the use of the SQLITE_ENABLE_COLUMN_METADATA
compile time constant to detect whether sqlite3_column_table_name() is
available by a working feature detection (otherwise bug_42589.phpt
would fail).  We also skip bug73068.phpt for libsqlite 3.11.0 to
3.14.1 which have a bug (<https://sqlite.org/src/info/ef360601>).

We also completely drop support for the obscure pdo_sqlite_external
extension (which could have been enabled on Windows only by passing
`--pdo-sqlite-external` to configure), since it is not needed anymore.

Furthermore, we remove references to the bundled libsqlite from
Makefile.gcov, CONTRIBUTING.md and README.REDIST.BINS.
2018-10-06 12:36:55 +02:00
Anatol Belski
40979277c0 Ensure target is \0 terminated 2018-10-04 19:17:58 +02:00
Anatol Belski
248c857a31 Reuse delivered length
Fix length calculation
2018-10-03 23:12:49 +02:00
Anatol Belski
14628f1c5d Add compatibility bit
readlink in PHP doesn't error on regular files.
2018-10-03 21:17:52 +02:00
Anatol Belski
91c905e83c Refactor php_sys_readlink
Also move the implementation into win32 where it belongs
2018-10-03 18:56:55 +02:00
Anatol Belski
3e2549d74f Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #76947 file_put_contents() blocks the directory of the file (__DIR__)
2018-10-03 00:22:34 +02:00
Anatol Belski
8209a8821c Fixed bug #76947 file_put_contents() blocks the directory of the file (__DIR__)
The condition was wrong. The target buffer size only matters, when some
output is going to be copied into it.
2018-10-03 00:15:43 +02:00
Anatol Belski
e794bde35d Merge branch 'PHp-7.3'
* PHp-7.3:
  Add spectre switch for suitable vc14 versions
2018-09-18 10:47:34 +02:00
Anatol Belski
f608a60456 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add spectre switch for suitable vc14 versions
2018-09-18 10:46:44 +02:00
Anatol Belski
a747db872f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add spectre switch for suitable vc14 versions
2018-09-18 10:45:18 +02:00
Anatol Belski
be02b2e8fd Add spectre switch for suitable vc14 versions 2018-09-18 10:43:52 +02:00
Peter Kokot
b189c2432a Remove HAVE_STDARG_H
The C89 standard and later defines the `<stdarg.h>` header as part of
the standard headers [1]. On current systems it is always present and
can be included unconditionally.

Checking for presence and functionality of the `<stdarg.h>` header and
variadic function is not relevant anymore on current systems since this
is always available.

Also Autoconf suggests relying on at least C89 or above [2] and [3].

The following files were regenerated with re2c 1.0.3:
- Zend/zend_language_scanner.c
- Zend/zend_language_scanner_defs.h

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-18 05:44:56 +02:00
Peter Kokot
d3ca28f569 Remove HAVE_STRING_H
The C89 standard and later defines the `<string.h>` header as part of
the standard headers [1] and on current systems it is always present.

Code included also `<strings.h>` header as an alterinative in some
files. This kind of check was relevant on some older systems where the
`<strings.h>` file included definitions for the C89 compliant
`<string.h>`. Today such alternative check is not required anymore. The
`<strings.h>` file is part of the POSIX definition these days.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

This patch also cleans few unused `<strings.h>` inclusions in the libmbfl.

[1]: https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-18 05:32:08 +02:00
Anatol Belski
321c0cc349 Fix localized error messages and memory leaks
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.

Initialize error buffer

Avoid code duplication
2018-09-17 10:56:50 +02:00
Peter Kokot
7dd62811ce Remove HAVE_STDLIB_H
The C89 and later standard defines the `<stdlib.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STDLIB_H` symbol can be removed.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-16 20:53:53 +02:00
Anatol Belski
c571005bd9 Merge branch 'PHP-7.3'
* PHP-7.3:
  Sync version for vc++ 15.9
2018-09-13 19:28:02 +02:00
Anatol Belski
6bd6265845 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Sync version for vc++ 15.9
2018-09-13 19:27:29 +02:00
Anatol Belski
83685b5258 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync version for vc++ 15.9
2018-09-13 19:26:49 +02:00
Anatol Belski
d77ac7b3dc Sync version for vc++ 15.9 2018-09-13 19:25:23 +02:00
Peter Kokot
77118fc925 Remove HAVE_ASSERT_H
The `<assert.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.

Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H`
symbol defined by Autoconf in configure.ac can be both removed [2].

This patch also removes unused <assert.h> includes where c files don't
use the `assert()` macro.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-09 09:43:03 +02:00
Peter Kokot
29dc0470c8
Remove AC_FUNC_UTIME_NULL
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the AC_FUNC_UTIME_NULL.

This macro checks if `utime(file, NULL)` sets file's timestamp to the
current time and defines the `HAVE_UTIME_NULL` symbol. This check was
relevant on very old systems (for example, 4.3BSD released in 1986) and
today can be omitted for systems with utime since it should be well
supported by now. [2]

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-04 12:03:34 +02:00
Peter Kokot
ef12e96215 Remove AC_FUNC_VPRINTF
Autoconf 2.59d (released in 2006) 1 started promoting several macros
as not relevant for newer systems anymore, including the AC_FUNC_VPRINTF.

This macro checks for presence of the vprint function otherwise checks
for presence of the _doprnt function. This check was relevant on very
old systems and today can be omitted since it should be well supported
by now. [2]

Also PHP doesn't use the HAVE_VPRINTF or HAVE_DOPRNT symbols.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-08-29 21:31:55 +02:00
Peter Kokot
409b5133cc Change some permissions from 755 to 644
This patch syncs file permissions accross the PHP source code files
since these don't need to be executable.
2018-08-28 23:26:49 +02:00
Anatol Belski
e42e8b1051 Refactor stat implementation
- move relevant parts into win32
- general cleanup
- use Windows API and fallback to POSIX
- improve filetime to timestamp conversion
- improve stat/fsat
- handle ino by using file index
- handle st_dev by using volume serial number

The inode implementation is based on file indexes from NTFS. On 32-bit,
fake inodes are shown, that may lead to unexpeted results. 64-bit
implementation is most reliable.
2018-08-26 22:30:06 +02:00
Peter Kokot
3ceecaa9a0 Replace HAVE_ST_BLOCKS with HAVE_STRUCT_STAT_ST_BLOCKS
Since Autoconf 2.50+ macro AC_STRUCT_ST_BLOCKS defines the new
HAVE_STRUCT_STAT_ST_BLOCKS symbol and has deprecated the previous
HAVE_ST_BLOCKS.

PHP 5.3 required Autoconf 2.13 (released in 1999) or newer, since PHP
5.4 the autoconf 2.59 (released in 2003) or newer was required, and
since PHP 7.2, autoconf 2.64 (released in 2008) or newer is required.
2018-08-24 18:33:23 +02:00
Anatol Belski
644bdaf9cd Merge branch 'PHP-7.3'
* PHP-7.3:
  mkdist.php: recursively check dll dependencies
2018-08-23 21:28:08 +02:00
Anatol Belski
f15fc8ea1e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  mkdist.php: recursively check dll dependencies
2018-08-23 21:27:43 +02:00
Anatol Belski
8f43ec1e83 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  mkdist.php: recursively check dll dependencies
2018-08-23 21:26:40 +02:00
Dylan K. Taylor
b9bf9ddce6 mkdist.php: recursively check dll dependencies
Fix duplication of recursively checked deps
2018-08-23 21:25:54 +02:00
Christoph M. Becker
ef1b26f080 Map ERROR_PRIVILEGE_NOT_HELD to EACCES
Attempting to create a symlink on Windows via the CLI SAPI without
administrative rights is likely to fail with ERROR_PRIVILEGE_NOT_HELD.
Therefore we map this Windows error to EACCES to get better diagnostics
and to avoid the assert() failure in debug mode.
2018-08-19 13:56:34 +02:00
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Anatol Belski
9652fc624a Merge branch 'PHP-7.3'
* PHP-7.3:
  Remove asan incompatible options
2018-08-03 14:11:18 +02:00
Anatol Belski
2ea7222440 Remove asan incompatible options 2018-08-03 14:10:37 +02:00
Anatol Belski
df5e09c5a8 Use inliner cache also for non ext/sapi sources 2018-08-03 12:36:19 +02:00
Anatol Belski
9d89cf95d3 Missing piece for the inliner cache 2018-08-03 10:20:03 +02:00
Anatol Belski
309ae35773 Enable inline reader cache 2018-08-02 16:29:59 +02:00
Christoph M. Becker
c9861bd7a9 Create and expose php_sys_symlink() and php_sys_link()
These macros are supposed to behave like POSIX's symlink() and link(),
respectively, on POSIX compliant systems and on Windows.

Future scope: merge link.c and link_win32.c
2018-08-02 14:08:30 +02:00
Anatol Belski
d53978bd59 Suppress more irrelevant clang warnings 2018-08-01 18:18:37 +02:00
Peter Kokot
d2184efb7b Replace obsolete AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV
Autoconf 2.50 released in 2001 has made several macros obsolete. Instead
of the AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV the new
AC_CHECK_MEMBERS should be used.

When checking for the presence of stat struct members st_blkzize and
st_rdev the new AC_CHECK_MEMBERS macro defines new constants
HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV.

Old constants HAVE_ST_BLKSIZE and HAVE_ST_RDEV need to be replaced
respectively in PHP code (this patch) and in PHP extenstions if they use
them.

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version.
2018-07-29 13:59:40 +02:00
Peter Kokot
cf8ef08e20 Fix typos in code 2018-07-27 16:27:41 +02:00
Peter Kokot
a5e80b22e1 Fix typos in code comments 2018-07-25 11:57:11 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Kalle Sommer Nielsen
b1864b0178 Fix HKEY registry path (not that it should matter, dead code, Anatol?) 2018-07-23 15:37:02 +02:00
Anatol Belski
1bcc2fcb4e Avoid early allocation 2018-07-13 07:35:33 +02:00
Anatol Belski
644ab58d0f Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed RecursiveDirectoryIterator with long path or with edge case length
2018-07-12 19:58:43 +02:00
Anatol Belski
f28aeaee05 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed RecursiveDirectoryIterator with long path or with edge case length
2018-07-12 19:57:08 +02:00
Anatol Belski
99fe18503a Fixed RecursiveDirectoryIterator with long path or with edge case length
The search path needs to be appended with the wild card. Till now, an
edge case existed, so then if a path is 259 bytes long, which is smaller
_MAX_PATH, the suffix would cause the final search path to become longer
than _MAX_PATH. It is an edge case, when the starting path happens to
have a specific length. If the starting path was longer than _MAX_PATH
or the addition of "\\*" would not exceed _MAX_PATH, the function was
correct. Except for rewind, which was broken in the case of the long
path.
2018-07-12 19:49:32 +02:00
Anatol Belski
0834679e40 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix macro
2018-07-12 11:38:18 +02:00
Anatol Belski
9443c61928 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix macro
2018-07-12 11:37:13 +02:00
Anatol Belski
cc7b000d2c Fix macro 2018-07-12 11:35:00 +02:00
Anatol Belski
871d0aa5cd Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix condition
2018-07-11 13:16:04 +02:00
Anatol Belski
cc266045a5 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix condition
2018-07-11 13:13:56 +02:00
Anatol Belski
98102648cb Fix condition
It looks like the real length limit is 247 bytes, not 248 as documented.
2018-07-11 13:09:20 +02:00
Anatol Belski
3e1e3ab728 Remove conflicting declaration 2018-07-09 12:32:45 +02:00
Anatol Belski
ed23cea9de Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix event log handling in startup phase
  Fix bug #76488 Memory leak when fetching a BLOB field
2018-07-06 16:08:57 +02:00
Anatol Belski
d85651d58d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix event log handling in startup phase
  Fix bug #76488 Memory leak when fetching a BLOB field
  Fix year
  Bump version
2018-07-06 16:08:17 +02:00
Anatol Belski
246cb03e26 Fix event log handling in startup phase
The log header can be saved in the globals on startup. At the same
time, the log header can be changed per request. In case that
happened, wrong pointer will be free'd on shutdown. It can happen at
any point when zend_error() or similar is called at startup, like for
example in the case of the ini deprecation warnings. Thus, ZMM cannot
be used here.
2018-07-06 16:07:28 +02:00
Anatol Belski
a63e834b66 Merge branch 'PHP-7.2'
* PHP-7.2:
  Update libs_version.txt
2018-07-02 12:12:39 +02:00
Anatol Belski
26a33a96fa Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update libs_version.txt
2018-07-02 12:12:02 +02:00
Anatol Belski
f8258325b4 Update libs_version.txt 2018-07-02 12:09:54 +02:00
Philip Prindeville
2475337bd8 Add syslog's ident and facility parameters to config
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-07-01 18:08:07 +01:00
Anatol Belski
95a71caab1 Merge branch 'PHP-7.2'
* PHP-7.2:
  Sync versions for VC++ 15.8
2018-06-28 13:29:32 +02:00
Anatol Belski
e835916f65 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync versions for VC++ 15.8
2018-06-28 13:28:46 +02:00
Anatol Belski
88b5df91f6 Sync versions for VC++ 15.8 2018-06-28 13:23:19 +02:00
Peter Kokot
be49d61b19 Remove old SVN keywords substitutions
When the PHP source code was versioned in Subversion, there was
possible to substitute certain keywords such as $Id$ with revision
number, last change time and author name. Such approach is not used
in Git so this patch removes these outdated artifacts from source
code files.
2018-06-16 13:04:30 +02:00
Anatol Belski
b2a200188f Remove inappropriate FreeLibrary calls 2018-06-11 13:53:17 +02:00
Anatol Belski
05e2d3d59d Merge branch 'PHP-7.2'
* PHP-7.2:
  Remove inappropriate FreeLibrary call
2018-06-11 13:51:56 +02:00
Anatol Belski
7dcfa839c9 Remove inappropriate FreeLibrary call 2018-06-11 13:49:42 +02:00
Kalle Sommer Nielsen
dd494a83db The ZEND_EXTENSION change is merged with xdebug now so we can drop this for master only 2018-06-11 13:34:20 +02:00
Peter Kokot
24e1ae0e90 Remove some old occurrences of configure.in
configure.ac is the recommended file to use instead of the old
configure.in which will be removed in autotools future versions.
2018-06-04 17:59:00 +02:00
Anatol Belski
74be58938c Merge branch 'PHP-7.2'
* PHP-7.2:
  Translate correct C++ version with suitable compiler
  Fixed bug #76383 (array_map on $GLOBALS returns IS_INDIRECT)
2018-05-28 17:15:22 +02:00
Anatol Belski
d5ee654b71 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Translate correct C++ version with suitable compiler
  Fixed bug #76383 (array_map on $GLOBALS returns IS_INDIRECT)
2018-05-28 17:13:55 +02:00
Anatol Belski
5bf8032112 Translate correct C++ version with suitable compiler 2018-05-28 17:12:06 +02:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
1cdf5b7b4b Allow appending an arbitrary suffix to the packages 2018-05-16 17:10:23 +02:00
Anatol Belski
6fe3bf7831 Merge branch 'PHP-7.2'
* PHP-7.2:
  [ci skip] Update libs_version.txt
2018-05-06 16:10:42 +02:00
Anatol Belski
b00a5c03e6 [ci skip] Update libs_version.txt 2018-05-06 16:10:10 +02:00
Anatol Belski
978cef04a5 Implement output verbosity seting for nmakefile 2018-04-20 11:19:16 +02:00
Anatol Belski
51172e81aa Merge branch 'PHP-7.2'
* PHP-7.2:
  Update libs_versions.txt
2018-03-27 19:47:03 +02:00
Anatol Belski
a492fe213a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update libs_versions.txt
2018-03-27 19:46:25 +02:00
Anatol Belski
cdf72523f3 Update libs_versions.txt 2018-03-27 19:44:17 +02:00
Anatol Belski
e9cbd3c4b0 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix phpize build when DEFINE() is involved
2018-03-26 13:39:30 +02:00
Anatol Belski
35f832a007 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix phpize build when DEFINE() is involved
2018-03-26 13:38:55 +02:00
Anatol Belski
5b2c30d7e6 Fix phpize build when DEFINE() is involved 2018-03-26 13:33:55 +02:00
Anatol Belski
4be28e3f8e Merge branch 'PHP-7.2'
* PHP-7.2:
  Sync version for VC++ 15.7
2018-03-25 13:00:48 +02:00
Anatol Belski
86aecd8801 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync version for VC++ 15.7
2018-03-25 12:59:59 +02:00
Anatol Belski
84f565ec71 Sync version for VC++ 15.7 2018-03-25 12:59:15 +02:00
Anatol Belski
178549b2b0 Merge branch 'PHP-7.2'
* PHP-7.2:
  Provide core includes for the resource compiler by default
2018-03-12 14:16:59 +01:00
Anatol Belski
fc09d7e76f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Provide core includes for the resource compiler by default
2018-03-12 14:16:08 +01:00
Anatol Belski
4dd1be2079 Provide core includes for the resource compiler by default 2018-03-12 14:14:34 +01:00
Anatol Belski
5cd3b19fc8 Enable more asan checks 2018-03-11 23:08:27 +01:00
Anatol Belski
754be224d2 Fix clang build and analyze with SIMD enabled 2018-03-11 23:08:27 +01:00
Anatol Belski
b7940d368f Merge branch 'PHP-7.2'
* PHP-7.2:
  Exclude /Qspectre for clang analyzer
2018-03-07 15:23:39 +01:00
Anatol Belski
2d660dd630 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Exclude /Qspectre for clang analyzer
2018-03-07 15:23:03 +01:00
Anatol Belski
00bfc6eb49 Exclude /Qspectre for clang analyzer 2018-03-07 12:34:16 +01:00
Anatol Belski
10549ac62d Fix empty value 2018-03-02 23:10:02 +01:00
Anatol Belski
c7dc6cc66b Reflect native instruction set in snap filename 2018-03-02 20:39:41 +01:00
Anatol Belski
fd5a635225 Add intrinsics info to configure output 2018-03-02 18:12:14 +01:00
Anatol Belski
1648bfa3ce Improve help message 2018-03-01 15:37:56 +01:00
Anatol Belski
42022bc943 Constify readonly var 2018-02-27 20:50:37 +01:00
Anatol Belski
dfcbc2c32b Sync --enable-native-intrinsics to pecl 2018-02-20 17:33:58 +01:00
Anatol Belski
a08c0db2df Merge branch 'PHP-7.2'
* PHP-7.2:
  dos2unix
2018-02-20 08:00:55 +01:00
Anatol Belski
ea0355632d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  dos2unix
2018-02-20 08:00:08 +01:00
Anatol Belski
ef04bc4a51 dos2unix 2018-02-20 07:59:34 +01:00
Anatol Belski
d1d228838b Add basic cppcheck suppressions file 2018-02-19 17:43:49 +01:00
Anatol Belski
668a6d329c Reduce var scope 2018-02-19 17:43:48 +01:00
Anatol Belski
250df53204 Don't add empty include path 2018-02-19 14:15:33 +01:00
Anatol Belski
34fb5a8585 Merge branch 'PHP-7.2'
* PHP-7.2:
  Use more jobs with cppcheck
2018-02-19 11:28:13 +01:00
Anatol Belski
fa7c32040c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use more jobs with cppcheck
2018-02-19 11:27:42 +01:00
Anatol Belski
08b4f3c745 Use more jobs with cppcheck 2018-02-19 11:27:03 +01:00
Anatol Belski
34833c9d39 Avoid multiple wcslen() calls 2018-02-18 20:30:33 +01:00
Anatol Belski
036a80037b Avoid multiple wcslen calls 2018-02-18 15:26:33 +01:00
Anatol Belski
a5e532f729 Handle special case when SSE only requested for 32-bit build 2018-02-16 16:51:11 +01:00
Anatol Belski
d9994ff7b2 Rework --with-codegen-arch and --enable-native-intrinsics config 2018-02-16 16:23:27 +01:00
Anatol Belski
9d8417f190 Reduce variable scope 2018-02-15 21:18:58 +01:00
Anatol Belski
d7f65f30a0 Revert "Improve conversion loop"
This reverts commit 7a4573a55a.

Don't read over '\0'.
2018-02-12 22:59:21 +01:00
Anatol Belski
acc55cd34e Extend intrinsics config with AVX and AVX2 2018-02-12 20:54:27 +01:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Anatol Belski
dd4afad087 Fix visibility 2018-02-05 20:42:17 +01:00
Anatol Belski
7a4573a55a Improve conversion loop 2018-02-05 20:42:17 +01:00
Anatol Belski
7416562ab0 Merge branch 'PHP-7.2'
* PHP-7.2:
  Finer conditions, so /Qspectre is already usable with latest vc15
2018-02-05 10:41:22 +01:00
Anatol Belski
51a0e051fc Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Finer conditions, so /Qspectre is already usable with latest vc15
2018-02-05 10:40:45 +01:00
Anatol Belski
1368aea352 Finer conditions, so /Qspectre is already usable with latest vc15 2018-02-05 10:38:06 +01:00
Anatol Belski
a06cde8236 If the target attribute is available, attach it explicitly
The ifunc attribute might be not available as it is binary format
dependent.
2018-02-03 17:18:41 +01:00
Anatol Belski
ff02775331 Use 7za for packaging
Better compression, Unicode support and general compatibility.
2018-02-02 18:31:22 +01:00
Anatol Belski
acbd348969 Implement configuration option for explicit native intrinsics
It mimics -march=native, AVX and more to go, if needed.
2018-01-29 18:26:03 +01:00
Anatol Belski
b6f66f18ad Reimplement ASCII conversion using aligned routine 2018-01-24 18:35:40 +01:00
Anatol Belski
957b91b739 Implement SSE2 based ASCII to UTF-16 conversion
This also eliminates the INT_MAX length restriction.
2018-01-19 18:00:02 +01:00
Anatol Belski
e9eff0a425 Merge branch 'PHP-7.2'
* PHP-7.2:
  Add switches for Spectre variant 1 mitigation
2018-01-17 14:48:06 +01:00
Anatol Belski
f0aa379dc1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add switches for Spectre variant 1 mitigation
2018-01-17 14:47:39 +01:00
Anatol Belski
043d53c789 Add switches for Spectre variant 1 mitigation 2018-01-17 14:33:08 +01:00
Xinchen Hui
3a3e0493d0 Added ZEND_API zend_cpu_supports 2018-01-16 14:53:00 +08:00
Anatol Belski
3e40f661a3 Merge branch 'PHP-7.2'
* PHP-7.2:
  Sync for upcoming vc++ 15.6 version raise
2018-01-14 16:43:21 +01:00
Anatol Belski
be0620a2f0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync for upcoming vc++ 15.6 version raise
2018-01-14 16:42:17 +01:00
Anatol Belski
089a3213ae Sync for upcoming vc++ 15.6 version raise 2018-01-14 16:38:36 +01:00
Kalle Sommer Nielsen
8fe0ee690c Added a <in deps path> for includes and libs on configure 2018-01-04 08:58:27 +01:00
Gabriel Caruso
c215b8d147 Trailing whitespaces on win32
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-04 02:41:26 -02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a76eeea736 Merge branch 'PHP-7.2'
* PHP-7.2:
  Happy new year (Update copyright to 2018)

Conflicts:
	ext/phar/LICENSE
2018-01-03 16:02:15 +08:00
Xinchen Hui
0e62639d28 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Happy new year (Update copyright to 2018)
2018-01-03 16:00:34 +08:00
Lior Kaplan
fbfdd1e1c4 Happy new year (Update copyright to 2018) 2018-01-02 23:42:29 +02:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Anatol Belski
9baf84e513 Drop unused code 2017-12-15 15:00:20 +01:00
Anatol Belski
f3f6cd24e9 Modernize realpath and integrate quick variant into virtual_file_ex
The slower I/O as a traditional bottleneck on Windows which is
the target of this patch. The recursive path resolution, while being
an allround solution, is expensive when it comes to the common case.
Files with proper ACLs set can be resolved in one go by usage of specific
API. Those are available since Vista, so actually can be called old. Those
simpler api is used for the cases where no CWD_EXPAND is requested. For
the cases where ACLs are improper, the existing solution based on
FindFirstFile still does good job also partially providing quirks. Cases
involing reparse tags and other non local filesystems are also partially
server by new APIs.

The approach uses both APIs - the quick one for the common case still
integrating realpath cache, and the existing one as a fallback. The tests
show the I/O load drop on the realpath resolution part due to less
system calls for the sub part resolution of paths. In most case it is
justified, as the sub parts were otherwise cached or unused as well. The
realpath() implementation in ioutil is also closer to the POSIX.
2017-12-15 13:23:34 +01:00
Anatol Belski
71eaf0d97f Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75679 Path 260 character problem
2017-12-14 16:18:33 +01:00
Anatol Belski
ed210c186a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75679 Path 260 character problem
2017-12-14 16:17:37 +01:00
Anatol Belski
4c0af1fbd4 Fixed bug #75679 Path 260 character problem 2017-12-14 16:16:50 +01:00
Anatol Belski
f749448fc6 Sync known vc++ versions in 7.1 2017-12-11 14:13:38 +01:00
Anatol Belski
820ab91d36 Merge branch 'PHP-7.2'
* PHP-7.2:
  Add vc++ 19.12 to the known list
2017-12-11 12:58:49 +01:00
Anatol Belski
2d7bea0462 Add vc++ 19.12 to the known list 2017-12-11 12:57:58 +01:00