Commit Graph

584 Commits

Author SHA1 Message Date
Peter Kokot
7c1e0930c4 Remove TSRM_CHECK_GCC_ARG and LIBZEND_CPLUSPLUS_CHECKS
This removes two old Autoconf macro definitions since they are not used
anymore.
2018-07-31 05:59:05 +02:00
Peter Kokot
daaf706df0 Upgrade deprecated AC_OUTPUT macro calls
Autoconf 2.50 made several changes to macro calls. These include also
arguments passed to AC_OUTPUT macro. The upgrading chapter in Autoconf
documentation include an example of using AC_OUTPUT with
AC_CONFIG_FILES and AC_CONFIG_COMMANDS:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html

PHP 5.4 to 7.1 require Autoconf 2.59+, PHP 7.2+ require Autoconf 2.64+,
and PHP 7.2 phpize script requires Autoconf 2.59+ which are all greater
than above mentioned 2.50 version. Systems out there should well support
this by now.

This patch was created with the help of autoupdate script:
autoupdate <file>

More info on where exactly this got deprecated:
- ftp://ftp.gnu.org/old-gnu/Manuals/autoconf-2.13/html_mono/autoconf.html
- ftp://ftp.auckland.ac.nz/pub/gnu/Manuals/autoconf-2.52/html_chapter/autoconf_15.html
- http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
2018-07-29 16:04:39 +02:00
Peter Kokot
7394879adf Upgrade AX_FUNC_WHICH_GETHOSTBYNAME_R to serial 8
The AX_FUNC_WHICH_GETHOSTBYNAME_R macro is from the Autoconf Archive.
Latest version of the file has few docs changes. File is also renamed
as is a pattern of other m4 Autoconf Archive files.

Refs:
- http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_func_which_gethostbyname_r.m4
2018-07-29 15:59:33 +02:00
Peter Kokot
ab702e4fde Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files in
Zend and TSRM folders.
2018-07-29 15:46:43 +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
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
d6b2756da1 Merge branch 'PHP-7.2'
* PHP-7.2:
  Updated NEWS
  Fixed bug #75735 ([embed SAPI] Segmentation fault in sapi_register_post_entry)
2017-12-27 12:52:44 +08:00
Xinchen Hui
6693898b30 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75735 ([embed SAPI] Segmentation fault in sapi_register_post_entry)
2017-12-27 12:52:06 +08:00
Xinchen Hui
dc3822c343 Fixed bug #75735 ([embed SAPI] Segmentation fault in sapi_register_post_entry) 2017-12-27 12:51:50 +08:00
Anatol Belski
e8db69f3f7 Add info about thread API used 2017-12-21 17:54:31 +01:00
Anatol Belski
3c57027556 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix segfault. Compile param --with-tsrm-pth=yes
2017-12-21 13:49:55 +01:00
Anatol Belski
ddd401859c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix segfault. Compile param --with-tsrm-pth=yes
2017-12-21 13:49:05 +01:00
Evgeny Kalashnikov
a46f952c0f Fix segfault. Compile param --with-tsrm-pth=yes 2017-12-21 13:48:10 +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
261ddb760a Move temporary allocation to the stack 2017-12-09 13:15:28 +01:00
Anatol Belski
a9a49b8250 Improve ioutil access impl and refactor tsrm_win32_access 2017-12-08 20:58:19 +01:00
Anatol Belski
c6d0c8aa3b Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix C++ compatibility for TSRM_TLS
2017-11-15 12:45:21 +01:00
Anatol Belski
0e5d4ea555 Fix C++ compatibility for TSRM_TLS
If a C++11 source is compiled, thread_local is preferred. Furthermore,
at least GCC treats __thread vs. thread_local a different way and under
certain circumstances would refuse to compile __thread is a C++11 source.
This change is far behind in time, any up-to-date compiler supports C++11
and otherwise it won't take effect on lower versions.
2017-11-15 12:44:04 +01:00
Anatol Belski
12bd998d58 realloc() can return NULL 2017-10-23 13:27:34 +02:00
Kalle Sommer Nielsen
d3bc8beb4f Removed support for BeOS, development for BeOS was supported 17 years ago.
This patch however does not drop support for the BeOS compatible variant, Haiku, see Github PR #2697 which is currently a WiP

I intentionally left out some fragments for BeOS in the build system for that seems to be bundles
2017-08-29 22:03:56 +02:00
Kalle Sommer Nielsen
63ea681417 Remove this old obsolete TODO file 2017-08-29 21:23:04 +02:00
Kalle Sommer Nielsen
bfdd22a3de Remove old references to SAPIs and extensions no longer in the core 2017-07-19 09:09:24 +02:00
Anatol Belski
6a3a2bf18e vim folds and mode lines yet 2017-07-04 17:06:52 +02:00
Anatol Belski
f708f0bb72 use char* as we don't compile with UNICODE anyway 2017-04-28 14:03:06 +02:00
Anatol Belski
6a010ad492 Avoid unnecessary string copy
which is the case when there's no impersonation.
2017-04-27 16:03:12 +02:00
Anatol Belski
24ae881080 get rid of two strlen calls 2017-04-27 15:41:09 +02:00
Anatol Belski
871ea20e9c Merge branch 'PHP-7.1'
* PHP-7.1:
  fix error handling
2017-04-15 18:29:37 +02:00
Anatol Belski
5bd0baa891 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix error handling
2017-04-15 18:25:31 +02:00
Anatol Belski
9719621e07 fix error handling 2017-04-15 18:19:33 +02:00
Anatol Belski
4d64a49fcd export the main thread info 2017-04-15 17:48:40 +02:00
Anatol Belski
c698299550 Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Brian Evans
2fe9208ee3
Use modern autotools name of configure.ac instead of configure.in
configure.ac was introduced in 2001 with automake-1.15 and autoconf-2.50
to replace the file named configure.in.
Autotools is preparing to remove configure.in in Automake 2.0.
All new software should be using configure.ac.
This also fixes Bug #69770 where extensions are creating configure.in

Signed-off-by: Brian Evans <grknight@gentoo.org>
2017-01-27 06:07:40 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Anatol Belski
758af77e9d Path handling related refactorings
Primarily related to the path handling datatypes, to avoid unnecessary
casts, where possible. Also some rework to avoid code dup. Probably
more places are to go, even not path related, primarily to have less
casts and unsigned integers where possible. That way, we've not only
less warnings and casts, but are also safer with regard to the
integer overflows. OFC it's not a panacea, but still significantly
reduces the vulnerability potential.
2016-12-22 14:56:47 +01:00
Kalle Sommer Nielsen
75ea28a7ae Remove more NetWare leftovers 2016-11-21 15:22:30 +01:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Bob Weinand
07a6321228 Merge branch 'PHP-7.1' 2016-10-29 18:50:36 +02:00
Bob Weinand
be6bf71274 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-29 18:50:06 +02:00
Bob Weinand
36527eccbb Fixed build failure introduced by PR #2158
Note: AC_TRY_LINK interprets the source as part of a main function, ending up with int main() { /* ... */ int main() { /* ... */ } ; return 0; } here - Using AC_LINK_IFELSE with AC_LANG_SOURCE directly instead.
2016-10-29 18:49:38 +02:00
Joe Watkins
8d6cc00cbd Merge branch 'pull-request/2158' 2016-10-17 15:48:32 +01:00
Joe Watkins
ae6fc21f14 Merge branch 'pull-request/2158' 2016-10-17 14:46:03 +01:00
Fabrice Fontaine
e6bbc00964 Fix pthreads detection when cross-compiling
pthreads are not working when cross-compiling, indeed configure
sets pthreads_working to no if cross_compiling is detected.
This behavior is implemented in PTHREADS_CHECK. This function call
AC_CACHE_CHECK twice to retrieve ac_cv_pthreads_cflags and
ac_cv_pthreads_lib.
In these calls, the function PTHREADS_CHECK_COMPILE will call AC_TRY_RUN
function which will update the global pthreads_working variable.
This is not compliant with autoconf AC_CACHE_CHECK rules which specify
that "The commands-to-set-it must have no side effects except for
setting the variable cache-id".

So, this patch replaces pthread_working assignments with assignments on
a new local pthread_checked variable. Value of ptreads_working is
computed outside AC_CACHE_CHECK function depending on value of
ac_cv_pthreads_cflags and ac_cv_pthreads_lib.

Moreover, AC_TRY_RUN call is replaced by AC_TRY_LINK which will work
when cross-compiling.

Without this modification, thread safety option (--enable-maintainer-zts)
can not be enabled on embedded buildsystems such as buildroot.

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
2016-10-11 15:16:26 +02:00
Anatol Belski
41b502c8c7 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix HANDLE leak
2016-08-29 21:49:28 +02:00
Anatol Belski
2bfe926eb1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix HANDLE leak
2016-08-29 21:48:50 +02:00
Anatol Belski
1b227de970 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix HANDLE leak
2016-08-29 21:47:54 +02:00
Anatol Belski
c7b4cd1a51 fix HANDLE leak 2016-08-29 21:45:39 +02:00
Anatol Belski
a1ff39ffe5 backport relevant part from bug #72858 patch in 7.0 2016-08-25 12:46:28 +02:00
Anatol Belski
becc5cd11b sync shm* implementation signatures with POSIX 2016-08-23 00:27:17 +02:00