| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* PHP-7.3:
Fixed bug #78910
Fix #78878: Buffer underflow in bc_shift_addsub
Fix test
Fix #78862: link() silently truncates after a null byte on Windows
Fix #78863: DirectoryIterator class silently truncates after a null byte
Fix #78943: mail() may release string with refcount==1 twice
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fix #78296: is_file fails to detect file
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we're constructing extended-length paths (i.e. paths prefixed with
`\\?\`), we have to replace all forward slashes with backward slashes,
because the former are not supported by Windows for extended-length
paths.
The more efficient and likely cleaner alternative solution would be to
cater to this in `php_win32_ioutil_normalize_path_w()` by always
replacing forward slashes, but that might break existing code. It
might be sensible to change that for `master`, though.
|
| | |
|
| |
| |
| |
| |
| |
| | |
We must not assume that any file which is not a directory is a regular
file. Therefore we employ `GetFileType()` in this case to properly
distinguish between character special, FIFO special and regular files.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Checking for the exact linker version appears to be too restrictive; it
should be fine if the tens match.
We also refactor to avoid repeating ourselves.
|
| |
| |
| |
| |
| |
| |
| |
| | |
These two files have been: "UTF-8 Unicode (with BOM) text".
By applying `dos2unix` on these files the BOM has been removed.
I checked the whole source code with dos2unix:
These were the only two text files affected.
|
| |
| |
| |
| |
| |
| |
| | |
ext/win32std is unmaintained for years, so it is highly unlikely that
it is available. We therefore use regedit instead to register the
event source. We also remove the bundled syslog.reg, since it is of no
use, unless generated for the respective installation.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit cc44bad1f6ded6a62c9bbe4d145b5b418aa775f4, since its
assumptions were not correct. Actually, the classic event logging is
still used by PHP, because Windows 7 is still to be supported for a
while. Without the respective registry entries, the event log entries
show an error message regarding missing ID descriptions.
Thanks to ab@php.net for hinting at this!
Obviously, the part depending on ext/win32std has still to be
overhauled, and further improvements are conceivable; we will address
this in due course.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- yp_get_default_domain was part of ext/yp
- functions checks produce HAVE_function_name symbols. These checks are
currently not used in php-src neither in the extensions out there.
- Removed symbols because they are not used in the code:
- HAVE_GCVT
- HAVE_PUTENV
- HAVE_PUTENV
- HAVE_SETVBUF
- HAVE_TEMPNAM
- HAVE_SIN (sin is also defined in C89 standard)
- HAVE_SETSOCKOPT
- HAVE_LOCKF
- HAVE_ISASCII
- HAVE_YP_GET_DEFAULT_DOMAIN (and other yp extension related unused checks)
- HAVE_LINK
- HAVE_USLEEP is already defined in Windows configuration header
- HAVE_LIBBIND has not been used in php-src for a while anymore
- HAVE_GETHOSTNAME is duplicated in Windows configuration header
Closes GH-4417
|
| |
| |
| |
| |
| |
| | |
File usage was removed via 33fc7d77d7d0f7c85025b8aa82d62b154c4bc71f.
Closes GH-4411
|
| |
| |
| |
| |
| |
| |
| |
| | |
These were introduced in 504b9beae60a45e1b1e6466e97a6bd246dfc74f6
and their usages were removed via
4b3e19802385c5874eefd3ba4565f2efbc55dc96.
Closes GH-4410
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These were used on old Windows systems before Vista and also were
used together with unmaintained win32std extension.
https://docs.microsoft.com/en-us/windows/win32/eventlog/event-logging
Closes GH-4409
|
| |
| |
| |
| |
| |
| | |
Usage of this was removed via 4b3e19802385c5874eefd3ba4565f2efbc55dc96
Closes GH-4408
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- TIMELIB_OMIT_STDINT is not used anymore since
https://github.com/derickr/timelib/commit/a171f99cf02baf39549ab7209e37565b8b8f6529
- HAVE_GETTIMEOFDAY was defined multiple times in Windows headers
- ext/date/lib/timelib_config.h.win32 does not seem to be used
Closes GH-4400
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #78212: Segfault in built-in webserver
|
| |
| |
| |
| |
| |
| |
| |
| | |
Since syslog's ident and facility parameters have been added to
config[1], vsyslog() segfaults on Windows, if openlog() has not been
called before. We bring back the removed lines to fix this.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=2475337bd8a0fad0dac03db3f5e7e9d331d53653>
|
| |
| |
| |
| |
| |
| |
| |
| | |
These are part of the C89 and on today's systems not needed to be
checked anymore. This removes symbols HAVE_SIGNAL and HAVE_STRERROR.
- http://port70.net/~nsz/c/c89/c89-draft.html
- locale.h is also part of C89 but will be removed per request in PHP 8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While it is already possible to *set* CFLAGS and LDFLAGS (actually all
variables) from the environment for `nmake` (by passing the `/E`
option), it is not possible to *add* any (C|LD)FLAGS, which can be
useful in some cases. Instead of allowing this for `nmake`, we add
support for additional custom (C|LD)FLAGS to `configure`, similar to
how that works on Linux, so one could actually write:
````
set CFLAGS=foo & set LDFLAGS=bar & configure
````
This also allows us to use these flags during configure.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following functions don't need to be checked anymore since the
they are not used across the code or the symbols aren't used anymore:
- cuserid (not used)
- lrand48 (not used and removed via
6d6ef7aacc7f9b17709d2f93b70b359c75011f89)
- random (check is not used)
- srand48 (not used)
- srandom (not used)
- strdup (check is not used)
and the unused check symbols:
- HAVE_CUSERID
- HAVE_LRAND48
- HAVE_RANDOM
- HAVE_SRAND48
- HAVE_SRANDOM
- HAVE_STRDUP
Closes GH-4338
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The limits.h header is part of the C89 and is today available
everywhere. There is no need to check for presence of this header
anymore.
The timelib has already been patched upstream via
aae5907cb7e775f16bedf61b010b8692c12a2843
PHP extensions out there shouldn't rely on symbols defined during the
build anyway and neither they do on this particular symbol anymore.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.
https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3
- Remove also SKIPIF strcoll check in test
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of checking GetBinaryType() for each file, we do a much cheaper
pre-check whether the filename extension matches .exe or .com, and call
GetBinaryType() only in this case. For BC we also report .bat and .cmd
files as executables again.
The patch has been provided by @weltling.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
This reverts commit 969047749d33bb88a0573aa91a57e2070335111a.
|
| |
| |
| |
| |
| | |
This syncs PHP lexer files to all use *.re extension. The *.re files are
processed with the RE2C tool.
|
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix erroneous assertions
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.2:
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.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix #77821: Potential heap corruption in TSendMail()
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix #77821: Potential heap corruption in TSendMail()
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* PHP-7.1:
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To solve issues detected during testing, we backport the following
commits to PHP 7.2:
129c5c1181bf344b37e13fd6dc5dfe76c13d7208
9ac133a0b3863ca4d9659140154ee237e5f4669a
ce72bc6b658c335dd37393d0beb28584e6805e97
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
* pull-request/4046:
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.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The PHP_READDIR_R_TYPE m4 macro has been removed via
2b28f7189144a21e753dbc09efadd571121a82b9.
HAVE_POSIX_READDIR_R in windows header file is also not needed anymore.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.3:
Ensure double slashes are replaced by the path normalization
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|