Simon Burge <[EMAIL PROTECTED]> writes:
> Shouldn't be hard to do either.  I wonder if there's a case where a
> system has a native snprintf() but doesn't declare it in <stdio.h>?  I
> guess that they'd loose - scanning header files for function prototypes
> sounds too painful...

Then I wrote:
> Well, actually I guess I'm being a bit misleading in characterizing that
> as the same problem as the local prototypes.  The snprintf() guys are in a
> common header which gets included by (almost?) everybody, but the
> prototypes are omitted if HAVE_SNPRINTF is #defined.  The thing is, that
> gets #defined whether there's a native snprintf() or the nmh-included
> version is being used.  I guess there needs to be a different #define
> called NATIVE_SNPRINTF or something...

Okay, this was niggling me again, so I did some more research.  I was wrong
-- HAVE_SNPRINTF only gets #defined on OSes that have an snprintf() in the
system libraries.  Apparently AIX 4.1.5.0.01 _does_ have an snprintf(), but
your fear was justified, Simon -- it doesn't appear in any of the system
header files!

I suppose we could run the compiler in preprocessor mode on a file that does
a #include <stdio.h> and grep for snprintf in the output.  This would be a
separate test after the AC_REPLACE_FUNC and would set HAVE_SNPRINTF_PROTO or
something.

Does this sound right to everyone?  Perhaps I'll tackle this.  [In the
meantime I'm going over to comp.unix.aix to see if anyone knows why the heck
there's an snprintf() but no prototype for it.]

-----------------------------------------------------------------------
Dan Harkless                   | To prevent SPAM contamination, please 
[EMAIL PROTECTED]      | do not post this private email address
SpeedGate Communications, Inc. | to the USENET or WWW.  Thank you.     

Reply via email to