cvs: php4 /ext/standard lcg.c php_lcg.h

From: Date: Wed, 18 Jul 2001 22:55:53 +0000
Subject: cvs: php4 /ext/standard lcg.c php_lcg.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6259@lists.php.net to get a copy of this message
sas Wed Jul 18 18:55:53 2001 EDT Modified files: /php4/ext/standard php_lcg.h lcg.c Log: The lcg needs to operate on signed 32-bit integers, so use the proper php_int32 types here. Index: php4/ext/standard/php_lcg.h diff -u php4/ext/standard/php_lcg.h:1.11 php4/ext/standard/php_lcg.h:1.12 --- php4/ext/standard/php_lcg.h:1.11 Sun May 6 13:55:10 2001 +++ php4/ext/standard/php_lcg.h Wed Jul 18 18:55:52 2001 @@ -16,14 +16,16 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_lcg.h,v 1.11 2001/05/06 17:55:10 sniper Exp $ */ +/* $Id: php_lcg.h,v 1.12 2001/07/18 22:55:52 sas Exp $ */ #ifndef PHP_LCG_H #define PHP_LCG_H +#include "ext/standard/basic_functions.h" + typedef struct { - long s1; - long s2; + php_int32 s1; + php_int32 s2; } php_lcg_globals; double php_combined_lcg(void); Index: php4/ext/standard/lcg.c diff -u php4/ext/standard/lcg.c:1.18 php4/ext/standard/lcg.c:1.19 --- php4/ext/standard/lcg.c:1.18 Wed Jun 6 09:05:51 2001 +++ php4/ext/standard/lcg.c Wed Jul 18 18:55:52 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: lcg.c,v 1.18 2001/06/06 13:05:51 rasmus Exp $ */ +/* $Id: lcg.c,v 1.19 2001/07/18 22:55:52 sas Exp $ */ #include "php.h" #include "php_lcg.h" @@ -48,8 +48,8 @@ double php_combined_lcg(void) { - long q; - long z; + php_int32 q; + php_int32 z; LCGLS_FETCH(); MODMULT(53668,40014,12211,2147483563L, LCG(s1));

« previous php.cvs (#6259) next »