Skip to content

Commit c6e9f8e

Browse files
committed
Refactor attribution for ext/random code portions
This updates and adds attribution and license info about portions of code used in ext/random: - Portions of mt19937 code - Portions of xoshiro256 code - Portions of pcgoneseq128xslrr64 code
1 parent 767697c commit c6e9f8e

File tree

1 file changed

+92
-59
lines changed

1 file changed

+92
-59
lines changed

README.REDIST.BINS

Lines changed: 92 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
1. libmagic (ext/fileinfo) see ext/fileinfo/libmagic/LICENSE
22
2. libmbfl (ext/mbstring) see ext/mbstring/libmbfl/LICENSE
33
3. pcre2lib (ext/pcre)
4-
4. ext/standard crypt
5-
5. ext/standard crypt's blowfish implementation
6-
6. ext/standard/rand
4+
4. ext/random portions
5+
5. ext/standard crypt
6+
6. ext/standard crypt's blowfish implementation
77
7. ext/standard/scanf
88
8. ext/standard/strnatcmp.c
99
9. ext/standard/uuencode
@@ -117,7 +117,94 @@ PCRE2 independently.
117117
End
118118

119119

120-
4. ext/standard crypt
120+
4. ext/random portions
121+
122+
* Portions of mt19937 code:
123+
124+
The following mt19937 algorithms are based on a C++ class MTRand by
125+
Richard J. Wagner. For more information see the web page at
126+
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/MersenneTwister.h
127+
128+
Mersenne Twister random number generator -- a C++ class MTRand
129+
Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
130+
Richard J. Wagner v1.0 15 May 2003 [email protected]
131+
132+
The Mersenne Twister is an algorithm for generating random numbers. It
133+
was designed with consideration of the flaws in various other generators.
134+
The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
135+
are far greater. The generator is also fast; it avoids multiplication and
136+
division, and it benefits from caches and pipelines. For more information
137+
see the inventors' web page at http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
138+
139+
Reference
140+
M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
141+
Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on
142+
Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
143+
144+
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
145+
Copyright (C) 2000 - 2003, Richard J. Wagner
146+
All rights reserved.
147+
148+
Redistribution and use in source and binary forms, with or without
149+
modification, are permitted provided that the following conditions
150+
are met:
151+
152+
1. Redistributions of source code must retain the above copyright
153+
notice, this list of conditions and the following disclaimer.
154+
155+
2. Redistributions in binary form must reproduce the above copyright
156+
notice, this list of conditions and the following disclaimer in the
157+
documentation and/or other materials provided with the distribution.
158+
159+
3. The names of its contributors may not be used to endorse or promote
160+
products derived from this software without specific prior written
161+
permission.
162+
163+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
164+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
165+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
166+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
167+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
168+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
169+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
170+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
171+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
172+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
173+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
174+
175+
* Portions of xoshiro256 code are based on xoshiro256 generator:
176+
177+
Written in 2018 by David Blackman and Sebastiano Vigna ([email protected])
178+
179+
To the extent possible under law, the author has dedicated all copyright
180+
and related and neighboring rights to this software to the public domain
181+
worldwide. This software is distributed without any warranty.
182+
183+
See <http://creativecommons.org/publicdomain/zero/1.0/>.
184+
185+
* Portions of pcgoneseq128xslrr64 code:
186+
187+
PCG Random Number Generation for C.
188+
189+
Copyright 2014-2019 Melissa O'Neill <[email protected]>,
190+
and the PCG Project contributors.
191+
192+
SPDX-License-Identifier: (Apache-2.0 OR MIT)
193+
194+
Licensed under the Apache License, Version 2.0 (provided in
195+
LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0)
196+
or under the MIT license (provided in LICENSE-MIT.txt and at
197+
http://opensource.org/licenses/MIT), at your option. This file may not
198+
be copied, modified, or distributed except according to those terms.
199+
200+
Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either
201+
express or implied. See your chosen license for details.
202+
203+
For additional information about the PCG random number generation scheme,
204+
visit http://www.pcg-random.org/.
205+
206+
207+
5. ext/standard crypt
121208

122209
FreeSec: libcrypt for NetBSD
123210

@@ -149,7 +236,7 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
149236
SUCH DAMAGE.
150237

151238

152-
5. ext/standard crypt's blowfish implementation
239+
6. ext/standard crypt's blowfish implementation
153240

154241
The crypt_blowfish homepage is:
155242

@@ -195,60 +282,6 @@ Blowfish library (I can't be sure if I would think of something if I
195282
hadn't seen his code).
196283

197284

198-
6. ext/standard/rand
199-
200-
The following php_mt_...() functions are based on a C++ class MTRand by
201-
Richard J. Wagner. For more information see the web page at
202-
http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html
203-
204-
Mersenne Twister random number generator -- a C++ class MTRand
205-
Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
206-
Richard J. Wagner v1.0 15 May 2003 [email protected]
207-
208-
The Mersenne Twister is an algorithm for generating random numbers. It
209-
was designed with consideration of the flaws in various other generators.
210-
The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
211-
are far greater. The generator is also fast; it avoids multiplication and
212-
division, and it benefits from caches and pipelines. For more information
213-
see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html
214-
215-
Reference
216-
M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
217-
Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on
218-
Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
219-
220-
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
221-
Copyright (C) 2000 - 2003, Richard J. Wagner
222-
All rights reserved.
223-
224-
Redistribution and use in source and binary forms, with or without
225-
modification, are permitted provided that the following conditions
226-
are met:
227-
228-
1. Redistributions of source code must retain the above copyright
229-
notice, this list of conditions and the following disclaimer.
230-
231-
2. Redistributions in binary form must reproduce the above copyright
232-
notice, this list of conditions and the following disclaimer in the
233-
documentation and/or other materials provided with the distribution.
234-
235-
3. The names of its contributors may not be used to endorse or promote
236-
products derived from this software without specific prior written
237-
permission.
238-
239-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
240-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
241-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
242-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
243-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
244-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
245-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
246-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
247-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
248-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
249-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
250-
251-
252285
7. ext/standard/scanf
253286

254287
scanf.c --

0 commit comments

Comments
 (0)