Commit Graph

664 Commits

Author SHA1 Message Date
viest
5703943081 Deprecate AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES
These flags have been deprecated in glibc 2.28, so we also
deprecate them in PHP.

As we can't deprecate constants, we can only check for their use
in socket_addrinfo_lookup().
2019-08-26 11:33:18 +02:00
Peter Kokot
53299d610a Remove unused MISSING_MSGHDR_MSGFLAGS
Closes GH-4426
2019-07-18 02:17:14 +02:00
George Peter Banyard
1c1de0c41a Convert all php_error_docref0 to php_error_docref
Closes GH-4394
2019-07-13 02:05:17 +02:00
Nikita Popov
d6d9024cb8 Avoid use of random ports in some socket tests 2019-07-03 12:47:49 +02:00
Peter Kokot
c70d9cdb11 Remove unused check for struct cmsghdr
The result of this check is to whether to define the HAVE_CMSGHDR symbol
or not. The HAVE_CMSGHDR is never used in the code and it has been
removed via 90289924c0.

Closes GH-4337
2019-07-01 13:13:51 +02:00
Peter Kokot
9a3c8e51e3 Sync functions checks
Removed unused checks:
- mbsinit check removed, HAVE_MBSINIT removed (not used in php-src)
- mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since
  560ed89bfb which uses PHP's own implementation)
- strpncpy check removed, added via a8c9e893b6 and
  not used.
- setpgid check removed since HAVE_SETPGID is not used

Moved to a central configure.ac:
- fpclass
- mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src)
- sigprocmask
- getcwd
- getwd
- glob
- strfmon
- nice

Duplicated checks removed:
- gethostname
- getlogin
- getpwuid_r
- socketpair

- mprotect check simplified
2019-06-30 23:57:54 +02:00
Peter Kokot
2079b09854 Clean headers checks
Some headers were checked multiple times in the main configure.ac file
and in the bundled extensions or SAPIs themselves. Also many of these
checks are then used accross other extensions or SAPIs so a central
configure.ac makes most sense for these checks.
2019-06-27 02:45:09 +02:00
Nikita Popov
dd6d471834 Handle misaligned ifreq on macos 2019-06-20 17:24:16 +02:00
Joe Watkins
68785c00ef
fix flaky socket test 2019-06-18 08:30:46 +02:00
George Peter Banyard
cfdca10910
Remove dead code in sockets extension [ci skip] 2019-06-15 08:39:35 +02:00
Joe Watkins
afdf7ed5ba
fix flaky socket tests 2019-06-15 08:08:08 +02:00
Joe Watkins
f16b012116
fix mac tests on azure 2019-06-14 12:55:00 +02:00
Nikita Popov
4603ce731b Don't throw warning if testing multiple ports 2019-06-13 09:34:23 +02:00
Nikita Popov
cdefeb715b Use memset instead of brace initialization
Apparently {{0}} is not enough ... let's not rely on structure
layout specifics here.
2019-06-12 13:50:23 +02:00
Nikita Popov
2134cc25d2 Guard functions by SO_PASSCRED 2019-06-12 13:17:25 +02:00
Nikita Popov
f601eb15e6 Fix -Wmissing-braces warnings
Unfortunate that = {} is a GNU extension.
2019-06-12 11:54:12 +02:00
Joe Watkins
c54a247cb0
fix flaky sockets test - form of response is OS dependent 2019-06-12 08:47:35 +02:00
Joe Watkins
abe38b5e48
fix flaky test on OSX 2019-06-12 08:33:07 +02:00
Joe Watkins
52ca8ca7d5
fix flaky ipv4 loopback test 2019-06-10 10:35:31 +02:00
Christoph M. Becker
3b05bdedcd Use zero port in socket_(export|import)_stream-4-win.phpt
These regularly fail due to port clashes, though we don't seem to
use those ports in any other tests.

As we don't care about the specific port that is used here, pass
zero so that a random ephemeral port is used.
2019-06-06 16:19:19 +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
Nikita Popov
528aa7932a Use zero port in socket_(export|import)_stream-5.phpt
These regularly fail due to port clashes, though we don't seem to
use those ports in any other tests.

As we don't care about the specific port that is used here, pass
zero so that a random ephemeral port is used.
2019-06-05 11:58:11 +02:00
Nikita Popov
d512075ff8 Fix potential port conflicts 2019-06-04 16:11:52 +02:00
Christoph M. Becker
c12d474653 Prevent parallel test conflicts
These ports are already used by another test, so we change them.
2019-05-27 18:42:52 +02:00
Nikita Popov
fc8fb77262 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-23 11:13:14 +02:00
Nikita Popov
b394654c1e Merge branch 'PHP-7.2' into PHP-7.3 2019-05-23 11:12:59 +02:00
Nikita Popov
9a74b23297 Fixed bug #78038 socket_select with references 2019-05-23 11:12:15 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Dmitry Stogov
e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03:00
Nikita Popov
7f6c22cb3d Fix last maybe uninit warnings on 7.4
Most of these only occur under GCC 5. Not fond of all the workarounds
(especially the PDO one), but it gets us a clean build...
2019-04-15 11:35:13 +02:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Nikita Popov
c8e10c6119 More zpp error/variation test removals 2019-03-07 15:54:31 +01:00
Nikita Popov
8c62c69265 More zpp error/variation test removals
Some of these tests also check non-zpp conditions -- however, there is
always some other test that also checks those error conditions.
2019-03-06 13:40:22 +01:00
Nikita Popov
c937c55d75 Fix some port collisions in sockets tests 2019-02-25 09:24:45 +01:00
Nikita Popov
db894844e7 Avoid port conflicts in ext/sockets tests 2019-02-19 15:53:24 +01:00
Rodrigo Prado
b86d7738fb Add test socket_setopt() basic functionality
Rodrigo Prado de Jesus royopa@gmail.com
User Group: PHPSP #PHPTestFestBrasil
---------------------------------------------------------------
The function was not coveraged yet
sockets	Function	socket_setopt	no
http://gcov.php.net/viewer.php?version=PHP_HEAD&func=tested_functions
2019-02-13 02:30:48 +01:00
David Carlier
4e87e56e22 Adding bunch of FreeBSD socket options flags specifics.
SO_USER_COOKIE primarly to be traced via dtrace instrumentation.
If SO_USER_COOKIE is available, the rest is so the former is
two years old while the rest is from around 2008.
2019-02-12 10:27:33 +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
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Anatol Belski
8789348364 Merge branch 'PHP-7.3'
* PHP-7.3:
  Initialize s_un (sockaddr_un) to zero before using it. Fixes #76839.
2018-12-26 19:03:04 +01:00
Anatol Belski
e38e44e3c6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Initialize s_un (sockaddr_un) to zero before using it. Fixes #76839.
2018-12-26 19:01:36 +01:00
Michael Meyer
3c42c784c2 Initialize s_un (sockaddr_un) to zero before using it. Fixes #76839. 2018-12-26 18:58:27 +01:00
Nikita Popov
ef8fbd6fc9 Merge branch 'PHP-7.3' 2018-11-20 21:16:36 +01:00
Nikita Popov
7a0d3406f6 Merge branch 'PHP-7.2' into PHP-7.3 2018-11-20 21:16:28 +01:00
Mizunashi Mana
e672cd4385 Define __APPLE_USE_RFC_3542 for new ipv6 constants 2018-11-20 21:16:03 +01:00
Joe Watkins
177d45b7e7
Merge branch 'PHP-7.3'
* PHP-7.3:
  Validate length on socket_write
2018-11-13 13:00:50 +01:00
Joe Watkins
8a11c9ee76
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Validate length on socket_write
2018-11-13 13:00:08 +01:00
Joe Watkins
ce4eb89976
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Validate length on socket_write
2018-11-13 12:58:23 +01:00