You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Ralf S. Engelschall" <rs...@engelschall.com> on 1998/03/03 16:33:05 UTC

Re: [BUILD] fixs, RAND_MAX remains, rshd on NT

In article <Pi...@valis.worldgate.com> you wrote:
> On Tue, 3 Mar 1998, Ben Hyde wrote:

>> On sun4:
>>   gcc -c  -I../../os/unix -I../../include   -DSUNOS4 -DUSEBCOPY -DSTATUS -DUSE_HSREGEX '-DHTTPD_ROOT="/tmp/httpd"'  mod_rewrite.c
>>   mod_rewrite.c: In function `rewrite_rand':
>>   mod_rewrite.c:2771: `RAND_MAX' undeclared (first use this function)
>>   mod_rewrite.c:2771: (Each undeclared identifier is reported only once
>>   mod_rewrite.c:2771: for each function it appears in.)
>> 

> Guess we need a ifndef RAND_MAX and just guess at it being 32767...

I've fixed it the POSIX way by including <stdlib.h> but as always the
braindead SunOS 4.1.3 has really no such define:

[rse@sun] /u/rse 43 > grep RAND_MAX /usr/include/*
[rse@sun] /u/rse 44 > grep RAND_MAX /usr/include/*/*
[rse@sun] /u/rse 45 > uname -a
SunOS sun 4.1.3 7 sun4m
[rse@sun] /u/rse 46 > 

But is 32767 really a good value here:
Solaris defines it to this while FreeBSD defines it to 0x7fffffff.
Hmmm.. what actual value should we use for SunOS4 and other braindead
platforms?

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com