mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
60a69daec6
This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. 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
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
// $Id$
|
|
// vim:ft=javascript
|
|
|
|
ARG_ENABLE("hash", "enable hash support", "yes");
|
|
ARG_WITH("mhash", "mhash support", "no");
|
|
|
|
if (PHP_MHASH != "no") {
|
|
if (PHP_HASH == "no") {
|
|
PHP_HASH = "yes";
|
|
}
|
|
AC_DEFINE('PHP_MHASH_BC', 1);
|
|
}
|
|
|
|
if (PHP_HASH != "no") {
|
|
var sha3_arch_dir = "sha3/" + (X64 ? "generic64lc" : "generic32lc");
|
|
var sha3_dir = "ext/hash/" + sha3_arch_dir;
|
|
if (CHECK_HEADER_ADD_INCLUDE("KeccakHash.h", "CFLAGS_HASH", PHP_HASH + ";" + sha3_dir)) {
|
|
AC_DEFINE('HAVE_HASH_EXT', 1);
|
|
EXTENSION("hash", "hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c "
|
|
+ "hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c "
|
|
+ "hash_adler32.c hash_crc32.c hash_joaat.c hash_fnv.c hash_sha3.c");
|
|
|
|
ADD_SOURCES(sha3_dir, "KeccakHash.c KeccakSponge.c " + (X64 ? "KeccakP-1600-opt64.c" : "KeccakP-1600-inplace32BI.c"),
|
|
"hash");
|
|
ADD_FLAG("CFLAGS_HASH", "/DKeccakP200_excluded /DKeccakP400_excluded /DKeccakP800_excluded");
|
|
|
|
|
|
PHP_INSTALL_HEADERS("ext/hash/", "php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h " +
|
|
"php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h " +
|
|
"php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h ");
|
|
} else {
|
|
WARNING("hash not enabled; libraries and headers not found");
|
|
}
|
|
}
|