@@ -207,63 +207,6 @@ void reentrancy_shutdown(void)
207207
208208#endif
209209
210- #ifndef HAVE_RAND_R
211-
212- /*-
213- * Copyright (c) 1990, 1993
214- * The Regents of the University of California. All rights reserved.
215- *
216- * Redistribution and use in source and binary forms, with or without
217- * modification, are permitted provided that the following conditions
218- * are met:
219- * 1. Redistributions of source code must retain the above copyright
220- * notice, this list of conditions and the following disclaimer.
221- * 2. Redistributions in binary form must reproduce the above copyright
222- * notice, this list of conditions and the following disclaimer in the
223- * documentation and/or other materials provided with the distribution.
224- * 3. All advertising materials mentioning features or use of this software
225- * must display the following acknowledgement:
226- * This product includes software developed by the University of
227- * California, Berkeley and its contributors.
228- * 4. Neither the name of the University nor the names of its contributors
229- * may be used to endorse or promote products derived from this software
230- * without specific prior written permission.
231- *
232- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
233- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
234- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
235- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
236- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
237- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
238- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
240- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
241- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
242- * SUCH DAMAGE.
243- *
244- * Posix rand_r function added May 1999 by Wes Peters <wes@softweyr.com>.
245- */
246-
247- #include <sys/types.h>
248- #include <stdlib.h>
249-
250- static int
251- do_rand (unsigned long * ctx )
252- {
253- return ((* ctx = * ctx * 1103515245 + 12345 ) % ((u_long )PHP_RAND_MAX + 1 ));
254- }
255-
256-
257- PHPAPI int
258- php_rand_r (unsigned int * ctx )
259- {
260- u_long val = (u_long ) * ctx ;
261- * ctx = do_rand (& val );
262- return (int ) * ctx ;
263- }
264-
265- #endif
266-
267210
268211#ifndef HAVE_STRTOK_R
269212
0 commit comments