summaryrefslogtreecommitdiff
path: root/Zend/zend_portability.h
Commit message (Collapse)AuthorAgeFilesLines
* Disable RTLD_DEEPBIND under memory sanitizerNikita Popov2019-07-011-9/+8
| | | | This was already done for address sanitizer.
* Disable ifunc resolvers if memory sanitizer is usedNikita Popov2019-06-281-0/+8
| | | | | | Just marking them as no_sanitize("memory") is unforunately not sufficient, as the function still gets instrumented -- the attribute only disables reporting.
* Make ATTRIBUTE_UNUSED more portableNikita Popov2019-06-121-2/+6
|
* Reduce register pressure by reloading values on CPUs with few general ↵Dmitry Stogov2019-05-311-0/+5
| | | | purpose registers
* Remove restrict zend_portability defineNikita Popov2019-04-111-8/+0
| | | | | | We're not using this anywhere, and it causes warnings, so I'm dropping it. If we do end up needing this, it should be reintroduced with a ZEND_ prefix.
* Remove HAVE_LIMITS_HPeter Kokot2019-04-071-3/+1
| | | | | | | | | | | | | | | | | | The `<limits.h>` header file is part of the standard C89 headers [1] and on current systems can be included unconditionally. Since PHP requires at least C89 or greater, the `HAVE_LIMITS_H` symbol defined by Autoconf in configure.ac [2] can be ommitted and simplifed however due to bundled file library (libmagic) and timelib still using it, the removal there was omitted and done only in Zend.m4 file. Current bundled libraries libtime, oniguruma, and libmagic still include partial `HAVE_LIMITS_H` usage and will be more refactored when this is possible. Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-03-181-6/+2
|\
| * Remove x86 bit test optimizationNikita Popov2019-03-181-6/+2
| | | | | | | | | | This is undefined behavior and we cannot rely on it. Additionally it breaks builds using undefined behavior sanitizers.
* | add --enable-rtld-now build option to change dlopen behaviorRemi Collet2019-03-121-3/+9
| |
* | Use #ifdef instead of #ifNikita Popov2019-02-141-1/+1
| |
* | Make ABI of SIMD optimized functions independent of compiler flagsNikita Popov2019-02-141-1/+4
| | | | | | | | | | Always export these as normal functions and only use function pointers internally if necessary.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-02-141-1/+1
|\ \ | |/
| * Work around compiler flag dependent ABINikita Popov2019-02-141-1/+1
| |
| * Future-proof email addressesZeev Suraski2018-11-011-3/+3
| |
* | Remove local variablesPeter Kokot2019-02-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
| |
* | Update email addresses. We're still @Zend, but future proofing it...Zeev Suraski2018-11-011-3/+3
| |
* | Remove HAVE_STDARG_HPeter Kokot2018-09-181-3/+1
|/ | | | | | | | | | | | | | | | | | | | | 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
* Fix clang compilationAnatol Belski2018-08-011-1/+1
| | | | | | | By usage of -fmodules, all the intrinsic items are loaded automatically. The headers included come however from Visual Studio, thus bringing some conflicting declarations. On the other hand, -fmodules is needed to mitigate linking issues with clang in VS compatibility mode.
* Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | 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.
* Gereralize VA macro expansion mechanismAnatol Belski2018-06-211-0/+7
| | | | Avoids code duplication and makes in usable elsewhere.
* Fixed prototypes, foo(void) instead of foo()Dmitry Stogov2018-06-061-2/+2
|
* Extend compile conditionsAnatol Belski2018-05-151-1/+1
|
* Bit test optimizationDmitry Stogov2018-05-081-0/+7
|
* Attempt to fix build with gcc-4.8Xinchen Hui2018-03-011-1/+6
|
* Attempt to fix build reported fails in containersXinchen Hui2018-03-011-5/+3
|
* Optimize "backup" functions of inlined opcode handlers for sizeDmitry Stogov2018-02-151-0/+9
|
* Optimized base64_encode/decode with SIMD instructionsXinchen Hui2018-02-121-1/+63
|
* If the target attribute is available, attach it explicitlyAnatol Belski2018-02-031-0/+14
| | | | | The ifunc attribute might be not available as it is binary format dependent.
* Revoke the gcc only restrictionAnatol Belski2018-01-251-2/+2
| | | | | | clang at least 5.0 supports GNU style attributes and intrinsic macros. In general, compilers claiming this functionality should know, what they do.
* Macrify the common operationAnatol Belski2018-01-241-0/+3
|
* Move useful macro into zend_portability.hAnatol Belski2018-01-241-1/+9
|
* Implement intrinsic function resolving per MINITAnatol Belski2018-01-241-0/+18
|
* year++Xinchen Hui2018-01-021-1/+1
|
* fix build with older gccs: label attributes are only available with gcc 5+Nuno Lopes2017-12-041-5/+9
|
* Prefer "GNU asm goto" to __builtin_saddl_overflow() for overflow detection. ↵Dmitry Stogov2017-11-281-0/+4
| | | | This allows generation of significantly better code.
* Enable and fix printf() format warningsNikita Popov2017-11-161-6/+2
| | | | | | Add _unchecked() variants of zend_spprintf and zend_strpprintf for cases where we specifically want to disable these checks, such as use of %H.
* Merge branch 'PHP-7.1' into PHP-7.2Sara Golemon2017-07-271-1/+1
|\ | | | | | | | | * PHP-7.1: Simpler fix for #74974
| * Merge branch 'PHP-7.0' into PHP-7.1Sara Golemon2017-07-271-1/+1
| |\ | | | | | | | | | | | | * PHP-7.0: Simpler fix for #74974
| | * Simpler fix for #74974Pedro Magalhães2017-07-271-1/+1
| | |
* | | further sync for vim mode linesAnatol Belski2017-07-041-0/+2
| | |
* | | Move va_copy compatibility code into zend_portability.hNikita Popov2017-06-251-0/+12
| | | | | | | | | | | | | | | Previously this was defined in zend.c and php.h and also handled in another way in soap.c.
* | | Merge branch 'PHP-7.1'Nikita Popov2017-02-161-1/+7
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2017-02-161-1/+7
| |\ \ | | |/
| | * Disable RTLD_DEEPBIND when compiling with AddressSanitizer (-fsanitize=address).Ondřej Surý2017-02-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AddressSanitizer doesn't support RTLD_DEEPBIND resulting in erratic errors when deinitializing phar module and possibly others. Clang use __has_feature() macro to indicate compilation with AddressSanitizer while gcc uses __SANITIZE_ADDRESS__ define. Fixes bug #73677.
* | | Merge branch 'PHP-7.1'Nikita Popov2017-02-081-4/+6
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2017-02-081-4/+6
| |\ \ | | |/
| | * Add #ifndef restrictdreamsxin2017-02-081-4/+6
| | |
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
| * | Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |