On Tue, Oct 05, 2004 at 07:09:55PM -0400, Robert Story wrote:
> I'm looking at applying the strtok_r patch for 5.2, which will include a
> strtok_r implementation for platforms where it is missing. I started to look
> for a place to put that implementation, and I notices that there are several
> other string functions implemented, but each in their own file.
> 
> Any objections to merging strlcpy.c, strtol.c, strtoul.c and the new strtok_r
> into one file, string_utils.c? (or a similarly named file)

This smells like a bad idea. I can imagine all kinds of linker issues if
one of the functions is required by the platform and the other ones are
already provided: seems like a recipe for conflicts. Some linkers provide
for weak/strong names, but not all do, and it's easy to imagine that some
platforms provide either inline versions, or at least bogus declarations
in header files that are going to conflict (say, a missing /const/ on
a string parameter).

Are you proposing putting #ifdefs around all the functions in questions
to be guided by ./configure?

Steve

--- 
Stephen J Friedl | Security Consultant |  UNIX Wizard  |   +1 714 544-6561
www.unixwiz.net  | Tustin, Calif. USA  | Microsoft MVP | [EMAIL PROTECTED]


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to