Commit Graph

192 Commits

Author SHA1 Message Date
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
19e2101dfa Revert "ext/standard: Use PKG_CHECK_MODULES to detect the Argon2 library"
This reverts commit bdcef51bcb.

It seems that pkg-config support for libargon2 is still flaky:
 * No pc file on Alpine.
 * Custom builds of released libargon2 versions create a broken
   pc file. This is fixed in master, but not released.

Go back to the old detection code for now.
2019-06-13 16:53:05 +02:00
Nikita Popov
b654a07492 Revert option rename
Let's keep this at --with-password-argon2 to avoid churn, I don't
think we have a strong motivation to rename this one.
2019-06-12 09:28:25 +02:00
Hugh McMaster
bdcef51bcb
ext/standard: Use PKG_CHECK_MODULES to detect the Argon2 library 2019-06-12 06:54:54 +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
Peter Kokot
f5fa9ddbd5 Clean *nix build system
- remove some outdated and not used macro calls
- remove some unused variables
- Remove not needed comment from tokenizer config.m4
- Remove not needed comment
- remove not needed local variables for editors and syntax highlighting
2019-03-07 20:58:14 +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
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Peter Kokot
b719aa41f4 Fix minor Autoconf coding style
This fixes two minor Autoconf coding styles. Double quotes in arguments
don't need to be escaped. This removes warning given by autoreconf:
- warning: back quotes and double quotes must not be escaped in...
2018-07-31 03:09:44 +02:00
Peter Kokot
4371945b8b Replace obsolete AC_TRY_FOO with AC_FOO_IFELSE
Autoconf 2.50 released in 2001 made several macros obsolete including
the AC_TRY_RUN, AC_TRY_COMPILE and AC_TRY_LINK:
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2

These macros should be replaced with the current AC_FOO_IFELSE instead:
- AC_TRY_RUN with AC_RUN_IFELSE and AC_LANG_SOURCE
- AC_TRY_LINK with AC_LINK_IFELSE and AC_LANG_PROGRAM
- AC_TRY_COMPILE with AC_COMPILE_IFELSE and AC_LANG_PROGRAM

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version therefore systems
should be well supported by now.

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

Reference docs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
2018-07-30 02:36:38 +02:00
Peter Kokot
0a01eae039 Fix typo in config.m4
The AC_CHECK_FUNCS has the following synopsis:
AC_CHECK_FUNCS(function..., [action-if-found], [action-if-not-found]).

Fourth argument doesn't exist.
2018-07-29 06:10:16 +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
Charles R. Portwood II
55277a6684 RFC: Argon2 Password Hash Enhancements Implementation of Argon2id per RFC https://wiki.php.net/rfc/argon2_password_hash_enhancements
- m4 and Windows configure scripts now forces Argon2 reference library version >= 20161029
- Implementation tested against 20161029 and 20171227 for Argon2id support
- Updates Argon2 ext/standard/password/tests to run tests for both Argon2i and Argon2id
2018-06-21 13:26:57 +02:00
Joe Watkins
3382424903
Merge branch 'PHP-7.2'
* PHP-7.2:
  fix phpdbg disabling chroot support
2018-05-23 22:24:07 +02:00
Joe Watkins
a422b1e60c
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix phpdbg disabling chroot support
2018-05-23 22:23:53 +02:00
Joe Watkins
be11b354f4
fix phpdbg disabling chroot support 2018-05-23 22:23:13 +02:00
Tom Van Looy
7672f8be0b
Fix: follow the indent of the other configure options 2018-02-15 08:49:58 +01:00
Anatol Belski
83497327e7 Implement high resolution monotonic timer function hrtime() 2018-01-07 16:03:52 +01:00
David Carlier
a95e8b80db net/if.h requires sys/socket.h on OpenBSD
This led to a detection failure of this particular header.
2018-01-06 21:42:27 +01:00
Matteo Beccati
d3fec3bf03 Fix getifaddrs detection on NetBSD 2017-11-28 15:42:33 +01:00
Sara Golemon
7ca5a7d84e
Add net_get_interfaces() 2017-11-27 10:17:55 -05:00
Charles R. Portwood II
498716c2f7 Compatibility with libargon2 versions 20161029 and 20160821
libargon2 20161029 introduces the `type` parameter to the argon2_encodedlen
function that is not present in 20160821. This change ensures the Argon2
functionality introduced in RFC `argon2_password_hash` is compatible with
both versions, as the library version that package maintainers package may
differ.
2017-06-18 19:19:20 -04:00
Nikita Popov
f2c35fdda8 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-17 20:20:43 +01:00
Nikita Popov
2e83082605 Fix bug #74265 2017-03-17 20:19:40 +01:00
Nikita Popov
1b40313804 Merge branch 'PHP-7.1' 2017-02-08 00:54:27 +01:00
Nikita Popov
bb9adc4c52 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-08 00:53:36 +01:00
Christian Schmidt
714d825b62 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-08 00:53:18 +01:00
Nikita Popov
546af1966e Merge branch 'PHP-7.0' into PHP-7.1 2017-02-06 01:46:01 +01:00
Nikita Popov
8a8aa67844 Revert "Fix detection of isnan and isinf"
This reverts commit 9ea0949f43.
2017-02-06 01:45:53 +01:00
Nikita Popov
70b27b5ad8 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-05 18:10:04 +01:00
Christian Schmidt
9ea0949f43 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-05 18:09:04 +01:00
Nikita Popov
2aaf57e6ed Merge branch 'PHP-7.1' 2017-01-09 23:30:07 +01:00
Nikita Popov
aab3f784d0 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-09 23:29:33 +01:00
Leigh
14c72cc582 Fix check for linux getrandom syscall 2017-01-09 23:29:07 +01:00
Anatol Belski
c50abfdb8e Merge branch 'PHP-7.1'
* PHP-7.1:
  Implement github PR #1736
2017-01-07 15:42:44 +01:00
Anatol Belski
901a551bda Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Implement github PR #1736
2017-01-07 15:40:00 +01:00
Anatol Belski
486fc0424a Implement github PR #1736
This fixes leak issues on *BSD systems, as described in the PR.
2017-01-07 15:36:14 +01:00
Andrea Faulds
d8f27b2be8 Merge branch 'DedupNANINF' 2016-10-26 16:46:36 +01:00
Christoph M. Becker
1305fdaa3b Merge branch 'pull-request/1997' 2016-09-08 17:00:07 +02:00
Charles R. Portwood II
d883f65d31 Fixing issue with config.m4 script not correctly checking for PHP_PASSWORD_ARGON2 2016-08-01 19:03:34 -05:00
Charles R. Portwood II
0d4d8eab53 Removing Argon2d, changing config arg to --with-password-argon2
Argon2d is not suitable for password_hashing. To ensure best practices
within password_*, Argon2d was removed.

--with-argon2 implies the full feature set of Argon2, whereas this
feature only implements Argon2i within password_*. Consequently
the feature flag was renamed to --with-password-argon2
2016-08-01 18:53:24 -05:00
Charles R. Portwood II
9bedcb7a61 Adding to PHP library includes 2016-07-12 10:24:11 -05:00
Charles R. Portwood II
f4aa3a465b Fixing linker issue on linux when DIR is specified on --with-argon2 2016-07-11 23:13:07 -05:00
Charles R. Portwood II
bcfccdd9f4 Removing argon2 library files in favor of --with-argon2[=DIR]
- Configure flag now accepts --with-argon2 for dynamic linking with
  libargon2. Argon2 will be enabled in password_* only if this
  flag is passed.
- --with-argon2 config flag allows user passed directory for linking
- Added Argon2 specific tests to ensure existing tests do not fail
  when argon2 is disable
2016-07-11 16:44:40 -05:00
Charles R. Portwood II
c2551a74d4 Working implementation with password_hash, password_verify 2016-07-08 23:45:19 -05:00
Leigh
eba6e7ce9a Split rand and mt_rand into separate files 2016-07-05 11:16:37 +01:00
Nikita Popov
be7a50b9ab Move HAVE_ATTRIBUTE_ALIGNED check outside crypt block
This is checked outside the crypt() implementation as well.
2016-03-25 20:50:52 +01:00
Nikita Popov
786effaff6 Remove PHP_*_CRYPT constants
They are always 1.
2016-03-25 20:48:34 +01:00
Nikita Popov
a142c274fb Ensure that all crypt() formats are supported
Checks for md5, sha512 and sha256 were missing.

As a result the PHP_*_CRYPT constants are always 1 now.
2016-03-25 20:39:14 +01:00