Re: PATCH: build psiconv like other libs


Subject: Re: PATCH: build psiconv like other libs
From: Tom Briggs (tom@sane.com)
Date: Sun Jan 28 2001 - 10:39:35 CST


 
> I just have one question: where do you link in the `compat' library?
> At first sight, you just don't. That is no big deal; but I am a little
> worried about platforms that do not have strdup. Will this work out
> automagically?

   At this point it's not being linked in because as far as I'm aware it
isn't needed. Then again, the only platforms I've compiled it on are Win32
and Linux, so I haven't exactly tested the majority.
   Haven't we had a dozen conversations about non-standard functions before?
Is it really preferable to have to do a big dance around some compat library
for the sake of a one (or more, I dunno) functions that I'm sure could be
replaced with XP code?

> And the final question: if Windows does not have snprintf and vsnprintf,
> why does it have a _snprintf and _vsnprintf? Are they declared in

   I wish I knew. :)
   I don't think that either function is standard, so that probably has
something to do with it.

> system headers with those names? If not, through what system header
> are they picked up? And wouldn't it be nicer if I added a configure-check
> for it and did the #define in config.h?

   _snprintf and _vsnprintf are declared in a couple of the standard headers
(I don't remember which ones off the top of my head, but they really common
ones line stdlib.h). Where snprintf and vsnprintf are declared I have no idea.
   Though I wouldn't have attempted to fix it with configure anyway, I didn't
expect it would be possible to catch it that way because code which calls
snprintf or vsnprintf will *compile*, but it won't *link*. Maybe I don't
know enough about autoconf, but I didn't think that would help any.

   -Tom



This archive was generated by hypermail 2b25 : Sun Jan 28 2001 - 10:46:12 CST