version 1.523.2.10, 2004/11/06 20:53:40
|
version 1.523.2.11, 2004/11/06 21:18:27
|
Line 52 use Apache::lonlocal;
|
Line 52 use Apache::lonlocal;
|
use Storable qw(lock_store lock_nstore lock_retrieve freeze thaw); |
use Storable qw(lock_store lock_nstore lock_retrieve freeze thaw); |
use Time::HiRes qw( gettimeofday tv_interval ); |
use Time::HiRes qw( gettimeofday tv_interval ); |
my $readit; |
my $readit; |
my $_64bit=0; |
my $_64bit; |
|
|
=pod |
=pod |
|
|
Line 4732 sub numval {
|
Line 4732 sub numval {
|
$txt=~tr/U-Z/0-5/; |
$txt=~tr/U-Z/0-5/; |
$txt=~tr/u-z/0-5/; |
$txt=~tr/u-z/0-5/; |
$txt=~s/\D//g; |
$txt=~s/\D//g; |
if ($_64bit) { if ($total > 2**32) { return -1; } } |
if ($_64bit) { if ($txt > 2**32) { return -1; } } |
return int($txt); |
return int($txt); |
} |
} |
|
|
Line 4837 sub rndseed_64bit {
|
Line 4837 sub rndseed_64bit {
|
my $num2=$nameseed+$domainseed+$courseseed; |
my $num2=$nameseed+$domainseed+$courseseed; |
#&Apache::lonxml::debug("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); |
#&Apache::lonxml::debug("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); |
#&Apache::lonxml::debug("rndseed :$num:$symb"); |
#&Apache::lonxml::debug("rndseed :$num:$symb"); |
if ($_64bit) { $num1=(($num1<<32)>>32); } |
if ($_64bit) { $num1=(($num1<<32)>>32); $num2=(($num2<<32)>>32); } |
if ($_64bit) { $num2=(($num2<<32)>>32); } |
|
return "$num1,$num2"; |
return "$num1,$num2"; |
} |
} |
} |
} |
Line 4861 sub rndseed_64bit2 {
|
Line 4860 sub rndseed_64bit2 {
|
my $num2=$nameseed+$domainseed+$courseseed; |
my $num2=$nameseed+$domainseed+$courseseed; |
#&Apache::lonxml::debug("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); |
#&Apache::lonxml::debug("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); |
#&Apache::lonxml::debug("rndseed :$num:$symb"); |
#&Apache::lonxml::debug("rndseed :$num:$symb"); |
if ($_64bit) { $num1=(($num1<<32)>>32); } |
if ($_64bit) { $num1=(($num1<<32)>>32); $num2=(($num2<<32)>>32); } |
if ($_64bit) { $num2=(($num2<<32)>>32); } |
|
return "$num1,$num2"; |
return "$num1,$num2"; |
} |
} |
} |
} |
Line 4884 sub rndseed_64bit3 {
|
Line 4882 sub rndseed_64bit3 {
|
my $num1=$symbchck+$symbseed+$namechck; |
my $num1=$symbchck+$symbseed+$namechck; |
my $num2=$nameseed+$domainseed+$courseseed; |
my $num2=$nameseed+$domainseed+$courseseed; |
#&Apache::lonxml::debug("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); |
#&Apache::lonxml::debug("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); |
#&Apache::lonxml::debug("rndseed :$num:$symb"); |
#&Apache::lonxml::debug("rndseed :$num1:$num2:$_64bit"); |
if ($_64bit) { $num1=(($num1<<32)>>32); } |
if ($_64bit) { $num1=(($num1<<32)>>32); $num2=(($num2<<32)>>32); } |
if ($_64bit) { $num2=(($num2<<32)>>32); } |
|
return "$num1:$num2"; |
return "$num1:$num2"; |
} |
} |
} |
} |
Line 5247 sub goodbye {
|
Line 5245 sub goodbye {
|
} |
} |
|
|
BEGIN { |
BEGIN { |
{ |
|
use integer; |
|
my $test=(2**32)+1; |
|
if ($test != 0) { $_64bit=1; } |
|
} |
|
# ----------------------------------- Read loncapa.conf and loncapa_apache.conf |
# ----------------------------------- Read loncapa.conf and loncapa_apache.conf |
unless ($readit) { |
unless ($readit) { |
{ |
{ |
Line 5402 $dumpcount=0;
|
Line 5395 $dumpcount=0;
|
&logtouch(); |
&logtouch(); |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
$readit=1; |
$readit=1; |
|
{ |
|
use integer; |
|
my $test=(2**32)+1; |
|
if ($test != 0) { $_64bit=1; } |
|
&logthis(" Detected 64bit platform ($_64bit)"); |
|
} |
} |
} |
} |
} |
|
|