httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Clary <jcl...@futurefx.com>
Subject Re: Finish 1.2!
Date Sun, 12 Jan 1997 01:49:49 GMT
> 
> On Sat, 11 Jan 1997, Jim Jagielski wrote:
> 
> > Looks like most OSs _don't_ have snprintf()... I would guess the best
> > solution would be similar to what we do for regex: provide a
> > version and allow for people to use that one if they need to or
> > want to. No need to rename it since even if the OS has snprintf,
> > if Apache is setup to compile it's own, any linker worth it's
> > salt will use that version instead of the one in libc (or
> > whereever).
> 
> You may see problems with prototype conflicts.
> 

The solution you see frequently in code where portablity matters is
to:

#ifndef USE_SNPRINTF
#define snprintf apache_snprintf
#endif

or something similar.. that way its overloaded in preprocessor directive
and never causes a protype conflict.

Mime
View raw message