httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Ralf S. Engelschall)
Subject Re: [BUILD] fixs, RAND_MAX remains, rshd on NT
Date Tue, 03 Mar 1998 15:33:05 GMT

In article <> 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

                                       Ralf S. Engelschall

View raw message