Commit Graph

2067 Commits

Author SHA1 Message Date
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