Skip to content

Commit b3f6092

Browse files
mvorisekdivinity76petkbukka
committed
initial blake3 commit
squash and rebase https://github.com/php/php-src/tree/896351a76d138071a21fea1ba20e91d5d0859c1b Co-authored-by: divinity76 <hans@loltek.net> Co-authored-by: Peter Kokot <peterkokot@gmail.com> Co-authored-by: Jakub Zelenka <bukka@php.net>
1 parent 4561e92 commit b3f6092

38 files changed

+33804
-131
lines changed

README.REDIST.BINS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
20. Lexbor (ext/lexbor/lexbor) see ext/lexbor/LICENSE
2121
21. Portions of libcperciva (ext/hash/hash_sha_{ni,sse2}.c) see the header in the source file
2222
22. uriparser (ext/uri/uriparser) see ext/uri/uriparser/COPYING
23+
23. BLAKE3 (ext/hash/blake3) see ext/hash/blake3/upstream_blake3/LICENSE_CC0
2324

2425
3. pcre2lib (ext/pcre)
2526

build/php.m4

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,6 +2510,103 @@ AC_DEFUN([PHP_REMOVE_OPTIMIZATION_FLAGS], [
25102510
CXXFLAGS=$(echo "$CXXFLAGS" | $SED -e "$sed_script")
25112511
])
25122512

2513+
dnl
2514+
dnl PHP_CHECK_ARM_NEON_SUPPORT
2515+
dnl
2516+
dnl check if we're compiling for ARM NEON
2517+
dnl
2518+
AC_DEFUN([PHP_CHECK_ARM_NEON_SUPPORT], [
2519+
AC_CACHE_CHECK([for ARM NEON support],ac_cv_target_arm_neon,[
2520+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2521+
int main(void) {
2522+
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
2523+
return 0;
2524+
#else
2525+
return 1;
2526+
#endif
2527+
}
2528+
]])],[
2529+
ac_cv_target_arm_neon=yes
2530+
],[
2531+
ac_cv_target_arm_neon=no
2532+
],[
2533+
ac_cv_target_arm_neon=no
2534+
])])
2535+
])
2536+
2537+
2538+
dnl
2539+
dnl PHP_CHECK_X86_TARGET
2540+
dnl
2541+
dnl check if we're compiling for x86/x86_64
2542+
dnl
2543+
AC_DEFUN([PHP_CHECK_X86_TARGET], [
2544+
AC_CACHE_CHECK([for x86 target],ac_cv_target_x86,[
2545+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2546+
int main(void) {
2547+
#if defined(__x86_64__) || defined(__i386__)
2548+
return 0;
2549+
#else
2550+
return 1;
2551+
#endif
2552+
}
2553+
]])],[
2554+
ac_cv_target_x86=yes
2555+
],[
2556+
ac_cv_target_x86=no
2557+
],[
2558+
ac_cv_target_x86=no
2559+
])])
2560+
])
2561+
2562+
dnl
2563+
dnl PHP_CHECK_WINDOWS_TARGET
2564+
dnl
2565+
dnl check if we're compiling for windows
2566+
dnl
2567+
AC_DEFUN([PHP_CHECK_WINDOWS_TARGET], [
2568+
AC_CACHE_CHECK([for windows target],ac_cv_target_windows,[
2569+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2570+
int main(void) {
2571+
#if defined(_WIN32)
2572+
return 0;
2573+
#else
2574+
return 1;
2575+
#endif
2576+
}
2577+
]])],[
2578+
ac_cv_target_windows=yes
2579+
],[
2580+
ac_cv_target_windows=no
2581+
],[
2582+
ac_cv_target_windows=no
2583+
])])
2584+
])
2585+
2586+
dnl
2587+
dnl PHP_CHECK_UNIX_TARGET
2588+
dnl
2589+
dnl check if we're compiling for a unix-ish target
2590+
dnl
2591+
AC_DEFUN([PHP_CHECK_UNIX_TARGET], [
2592+
AC_CACHE_CHECK([for unix-ish target],ac_cv_target_unix,[
2593+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2594+
int main(void) {
2595+
#if defined(unix) || defined(__unix) || defined(__unix__)
2596+
return 0;
2597+
#else
2598+
return 1;
2599+
#endif
2600+
}
2601+
]])],[
2602+
ac_cv_target_unix=yes
2603+
],[
2604+
ac_cv_target_unix=no
2605+
],[
2606+
ac_cv_target_unix=no
2607+
])])
2608+
])
2609+
25132610
dnl
25142611
dnl PHP_C_STANDARD_LIBRARY
25152612
dnl

configure.ac

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,19 @@ PHP_EBCDIC
329329
dnl Check whether the system byte ordering is bigendian.
330330
PHP_C_BIGENDIAN
331331

332+
dnl Check if we're targeting x86 / x86_64
333+
PHP_CHECK_X86_TARGET
334+
335+
dnl Check if we're targeting ARM Neon CPUs
336+
PHP_CHECK_ARM_NEON_SUPPORT
337+
338+
339+
dnl Check if we're targeting Windows
340+
PHP_CHECK_WINDOWS_TARGET
341+
342+
dnl Check whether we're targeting a unix-ish system
343+
PHP_CHECK_UNIX_TARGET
344+
332345
dnl Check whether writing to stdout works.
333346
PHP_TEST_WRITE_STDOUT
334347

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
Creative Commons Legal Code
2+
3+
CC0 1.0 Universal
4+
5+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12+
HEREUNDER.
13+
14+
Statement of Purpose
15+
16+
The laws of most jurisdictions throughout the world automatically confer
17+
exclusive Copyright and Related Rights (defined below) upon the creator
18+
and subsequent owner(s) (each and all, an "owner") of an original work of
19+
authorship and/or a database (each, a "Work").
20+
21+
Certain owners wish to permanently relinquish those rights to a Work for
22+
the purpose of contributing to a commons of creative, cultural and
23+
scientific works ("Commons") that the public can reliably and without fear
24+
of later claims of infringement build upon, modify, incorporate in other
25+
works, reuse and redistribute as freely as possible in any form whatsoever
26+
and for any purposes, including without limitation commercial purposes.
27+
These owners may contribute to the Commons to promote the ideal of a free
28+
culture and the further production of creative, cultural and scientific
29+
works, or to gain reputation or greater distribution for their Work in
30+
part through the use and efforts of others.
31+
32+
For these and/or other purposes and motivations, and without any
33+
expectation of additional consideration or compensation, the person
34+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35+
is an owner of Copyright and Related Rights in the Work, voluntarily
36+
elects to apply CC0 to the Work and publicly distribute the Work under its
37+
terms, with knowledge of his or her Copyright and Related Rights in the
38+
Work and the meaning and intended legal effect of CC0 on those rights.
39+
40+
1. Copyright and Related Rights. A Work made available under CC0 may be
41+
protected by copyright and related or neighboring rights ("Copyright and
42+
Related Rights"). Copyright and Related Rights include, but are not
43+
limited to, the following:
44+
45+
i. the right to reproduce, adapt, distribute, perform, display,
46+
communicate, and translate a Work;
47+
ii. moral rights retained by the original author(s) and/or performer(s);
48+
iii. publicity and privacy rights pertaining to a person's image or
49+
likeness depicted in a Work;
50+
iv. rights protecting against unfair competition in regards to a Work,
51+
subject to the limitations in paragraph 4(a), below;
52+
v. rights protecting the extraction, dissemination, use and reuse of data
53+
in a Work;
54+
vi. database rights (such as those arising under Directive 96/9/EC of the
55+
European Parliament and of the Council of 11 March 1996 on the legal
56+
protection of databases, and under any national implementation
57+
thereof, including any amended or successor version of such
58+
directive); and
59+
vii. other similar, equivalent or corresponding rights throughout the
60+
world based on applicable law or treaty, and any national
61+
implementations thereof.
62+
63+
2. Waiver. To the greatest extent permitted by, but not in contravention
64+
of, applicable law, Affirmer hereby overtly, fully, permanently,
65+
irrevocably and unconditionally waives, abandons, and surrenders all of
66+
Affirmer's Copyright and Related Rights and associated claims and causes
67+
of action, whether now known or unknown (including existing as well as
68+
future claims and causes of action), in the Work (i) in all territories
69+
worldwide, (ii) for the maximum duration provided by applicable law or
70+
treaty (including future time extensions), (iii) in any current or future
71+
medium and for any number of copies, and (iv) for any purpose whatsoever,
72+
including without limitation commercial, advertising or promotional
73+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74+
member of the public at large and to the detriment of Affirmer's heirs and
75+
successors, fully intending that such Waiver shall not be subject to
76+
revocation, rescission, cancellation, termination, or any other legal or
77+
equitable action to disrupt the quiet enjoyment of the Work by the public
78+
as contemplated by Affirmer's express Statement of Purpose.
79+
80+
3. Public License Fallback. Should any part of the Waiver for any reason
81+
be judged legally invalid or ineffective under applicable law, then the
82+
Waiver shall be preserved to the maximum extent permitted taking into
83+
account Affirmer's express Statement of Purpose. In addition, to the
84+
extent the Waiver is so judged Affirmer hereby grants to each affected
85+
person a royalty-free, non transferable, non sublicensable, non exclusive,
86+
irrevocable and unconditional license to exercise Affirmer's Copyright and
87+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
88+
maximum duration provided by applicable law or treaty (including future
89+
time extensions), (iii) in any current or future medium and for any number
90+
of copies, and (iv) for any purpose whatsoever, including without
91+
limitation commercial, advertising or promotional purposes (the
92+
"License"). The License shall be deemed effective as of the date CC0 was
93+
applied by Affirmer to the Work. Should any part of the License for any
94+
reason be judged legally invalid or ineffective under applicable law, such
95+
partial invalidity or ineffectiveness shall not invalidate the remainder
96+
of the License, and in such case Affirmer hereby affirms that he or she
97+
will not (i) exercise any of his or her remaining Copyright and Related
98+
Rights in the Work or (ii) assert any associated claims and causes of
99+
action with respect to the Work, in either case contrary to Affirmer's
100+
express Statement of Purpose.
101+
102+
4. Limitations and Disclaimers.
103+
104+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
105+
surrendered, licensed or otherwise affected by this document.
106+
b. Affirmer offers the Work as-is and makes no representations or
107+
warranties of any kind concerning the Work, express, implied,
108+
statutory or otherwise, including without limitation warranties of
109+
title, merchantability, fitness for a particular purpose, non
110+
infringement, or the absence of latent or other defects, accuracy, or
111+
the present or absence of errors, whether or not discoverable, all to
112+
the greatest extent permissible under applicable law.
113+
c. Affirmer disclaims responsibility for clearing rights of other persons
114+
that may apply to the Work or any use thereof, including without
115+
limitation any person's Copyright and Related Rights in the Work.
116+
Further, Affirmer disclaims responsibility for obtaining any necessary
117+
consents, permissions or other rights required for any use of the
118+
Work.
119+
d. Affirmer understands and acknowledges that Creative Commons is not a
120+
party to this document and has no duty or obligation with respect to
121+
this CC0 or use of the Work.

0 commit comments

Comments
 (0)