summaryrefslogtreecommitdiff
path: root/ext/gmp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #78574 (broken shared build)Remi Collet2019-09-201-1/+1
|
* Fix detection of gmp on clangNikita Popov2019-09-061-16/+18
| | | | | | | | | Split the default and custom path case. If the default is used, assume that the library must be on the default include and lib path. Only check that the version is appropriate. Something similar is needed for ldap, but the checking code is much more complex there, so I'm only adding a workaround for now.
* Remove unused definesPeter Kokot2019-07-181-1/+0
| | | | | | | | | | | | | | | | | | | | | Used in php-src the past and today removed and not used anymore: - HAVE_CURL_EASY_STRERROR - HAVE_CURL_MULTI_STRERROR - HAVE_NEW_MIME2TEXT - HAVE_MBSTR_CN - HAVE_MBSTR_JA - HAVE_MBSTR_KR - HAVE_MBSTR_RU - HAVE_MBSTR_TW Part of oniguruma which doesn't use these anymore - NOT_RUBY - HAVE_STDARG_PROTOTYPES Unused: - HAVE_MPIR Closes GH-4427
* Remove unused gmp_unary_ui_op() functionNikita Popov2019-06-111-16/+0
|
* Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macrosDmitry Stogov2019-05-281-1/+1
|
* Avoid uninitialized variable warnings in gmpNikita Popov2019-04-121-9/+6
|
* Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-2/+4
| | | | | | | | 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
* Remove local variablesPeter Kokot2019-02-032-17/+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.
* Remove yearly range from copyright noticeZeev Suraski2019-01-302-2/+2
|
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-152-2/+0
| | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. 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
* Trim trailing whitespace in testsGabriel Caruso2018-10-1444-49/+49
|
* Trim trailing whitespaces in build filesPeter Kokot2018-07-291-1/+1
| | | | | | | | Some editors utilizing .editorconfig automatically trim whitespaces. For convenience this patch removes whitespaces in certain build files: - ext/*/config*.m4 - configure.ac - acinclude.m4
* Fix typos in code commentsPeter Kokot2018-07-251-1/+1
|
* Remove unused Git attributes identPeter Kokot2018-07-251-1/+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.
* Move GMP bug 74670 test file to tests dirPeter Kokot2018-07-201-0/+0
|
* Fixed wrong zval_dtor() usageDmitry Stogov2018-07-051-1/+1
|
* Use zval_ptr_dtor() instead of zval_dtor() in internal functions that ↵Dmitry Stogov2018-07-051-2/+2
| | | | destroy new created object (This is safer and produces less code)
* Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-1/+1
| | | | | | | destructors. zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places. Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
* Merge branch 'PHP-7.2'Nikita Popov2018-07-022-1/+11
|\
| * Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-07-022-1/+11
| |\
| | * Fixed bug #74670Nikita Popov2018-07-022-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | Validate that "C" serialization payload is followed by "}" prior to calling the unserialize() handler. This mitigates issues caused by unserialize() not correctly handling strings that are not NUL terminated. Making sure that there is a "}" at the end avoids the problem.
* | | Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-1/+1
| | |
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-1/+1
| | | | | | | | | | | | where we sure about string persistence.
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-202-2/+2
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | Merge branch 'PHP-7.2'Nikita Popov2018-02-191-2/+2
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-02-191-2/+2
| |\ \ | | |/
| | * Fix incorrect printf modifiersNikita Popov2018-02-191-2/+2
| | |
* | | Reduce variable scopeAnatol Belski2018-02-181-3/+7
| | |
* | | Remove effectless assignmentAnatol Belski2018-02-181-2/+2
| | |
* | | Use bool instead of booleanGabriel Caruso2018-02-081-1/+1
| | |
* | | Use int instead of integer in type errorsGabriel Caruso2018-02-043-9/+9
| | | | | | | | | | | | | | | | | | | | | PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
* | | Add missing SKIPIF sectionsGabriel Caruso2018-02-038-0/+16
| | |
* | | Merge branch 'PHP-7.2'Anatol Belski2018-01-031-0/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Skip on Travis-CI
| * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-01-031-0/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Skip on Travis-CI
| | * Skip on Travis-CIAnatol Belski2018-01-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The current doc states max ram for a test VM would be 7.5G, the currently used container image has even less. This skip should be revisited, as the available memory amount shifts. The way of checking /proc/meminfo doesn't work reliably on containers at least, thus skipping explicitly on Travis-CI makes sense.
* | | Merge branch 'PHP-7.2'Anatol Belski2018-01-031-1/+16
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Extend skip section
| * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-01-031-1/+16
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Extend skip section
| | * Extend skip sectionAnatol Belski2018-01-031-1/+16
| | | | | | | | | | | | | | | The test requires some untrivial amount of RAM. Added a simple check for the system free RAM to avoid false positive fails.
* | | Merge branch 'PHP-7.2'Stanislav Malyshev2018-01-022-1/+31
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix some int/long confusion issues in GMP
| * | Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2018-01-022-1/+31
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix some int/long confusion issues in GMP
| | * Fix some int/long confusion issues in GMPStanislav Malyshev2018-01-022-1/+31
| | | | | | | | | | | | | | | | | | mpz_setbit seems to have limit of INT_MAX * GMP_NUMB_BITS on the number of bits supported, and will abort() if that limit is exceeded.
| | * year++Xinchen Hui2018-01-022-2/+2
| | |
| * | year++Xinchen Hui2018-01-022-2/+2
| | |
* | | year++Xinchen Hui2018-01-022-2/+2
| | |
* | | Add _IS_NUMBER as cast_object() target typeNikita Popov2017-12-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | convert_scalar_to_number() will now call cast_object() with an _IS_NUMBER argument, in which case the cast handler should return either an integer or floating point number, whichever is more appropriate. Previously convert_scalar_to_number() unconditionally converted objects to integers instead. Fixes bug #53033. Fixes bug #54973. Fixes bug #73108.
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| | |
* | | Add gmp_kronecker()Nikita Popov2017-12-113-0/+77
| | | | | | | | | | | | | | | Exposes the mpz_kronecker(), mpz_si_kronecker() and mpz_kronecher_si() for computing the Kronecker symbol.
* | | Add gmp_perfect_power()Nikita Popov2017-12-113-0/+62
| | | | | | | | | | | | | | | | | | Exposes the mpz_perfect_power_p() function. We already had the more specific gmp_perfect_square() function.
* | | Add gmp_lcm()Nikita Popov2017-12-113-0/+55
| | | | | | | | | | | | | | | | | | | | | Exposes mpz_lcm() and mpz_lcm_ui() for calculating the least common multiple. We already expose the somewhat complementary gmp_gcd() function.
* | | Add gmp_binomial()Nikita Popov2017-12-113-0/+99
| | | | | | | | | | | | | | | Adds PHP bindings for mpz_bin_ui and mpz_bin_uiui, for calculating binomial coefficients.