httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: cvs commit: apache-1.3/src/main http_main.c
Date Wed, 18 Mar 1998 00:43:10 GMT
Marc Slemko wrote:
> 
> > > >   -    ap_snprintf(buf, sizeof(buf), ".%u", getpid());
> > > >   +    ap_snprintf(buf, sizeof(buf), ".%lu", getpid());
> > > >        lock_fname = pstrcat(p, server_root_relative(p, lock_fname), buf,
NULL);
> > > 
> > > Wouldn't it make even more sense to cast it?
> > > 
> > >     ap_snprintf(buf, sizeof(buf), ".%lu", (unsigned long)getpid());
> > 
> Grumble.
> 
> But what if we have 32 bit longs and 64 bit PIDs?  Guess that isn't too
> likely on most systems; 64 bits for moth would be more likely.
> 

Even so, then getpid() would return an 64bit long but ap_snprintf
would be expecting a 32bit unsigned long (because of the .lu).
I also agree that if PIDs were 64bit, long would be that as well,
otherwise what else? :)

-- 
===========================================================================
   Jim Jagielski   |||   jim@jaguNET.com   |||   http://www.jaguNET.com/
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

Mime
View raw message