]> granicus.if.org Git - php/commitdiff
The lcg needs to operate on signed 32-bit integers, so use
authorSascha Schumann <sas@php.net>
Wed, 18 Jul 2001 22:55:52 +0000 (22:55 +0000)
committerSascha Schumann <sas@php.net>
Wed, 18 Jul 2001 22:55:52 +0000 (22:55 +0000)
the proper php_int32 types here.

ext/standard/lcg.c
ext/standard/php_lcg.h

index 22f6fc3fb58f936ab136dfffc48d9a409a942c03..51447252bab2c53326a410bc491dfdd08c4f3482 100644 (file)
@@ -48,8 +48,8 @@ static int php_lcg_initialized = 0;
 
 double php_combined_lcg(void)
 {
-       long q;
-       long z;
+       php_int32 q;
+       php_int32 z;
        LCGLS_FETCH();
 
        MODMULT(53668,40014,12211,2147483563L, LCG(s1));
index 1cb5fb009ce62472508e12e1efdeb3be5a93ef12..4abe6a13cec62737f4c2c23c1559f9585b92aefd 100644 (file)
 #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);