strcat+strcat+strcat == baaad

Patrik Stridvall ps at leissner.se
Mon Dec 2 06:15:29 CST 2002


> I suggest implementing strlcat and strlcpy, as in OpenBSD. I 
> can write 
> them, but I'm not sure where to place them. They should either be 
> inlined (as in - implemented in an include file as a static 
> func), or in 
> some library that will be linked (statically, I hope). Ideas?

Since the do exists on some platforms (OpenBSD and FreeBSD) the
obvious place to put them would be library/port.c like any
other function that doesn't exists on all platforms. Just
remember to add detect in configure.ac and use the HAVE_ macro
in library/port.c

As for (re)writing them. Why not just borrow the source from FreeBSD
or OpenBSD. They both have licenses compatible with Wine.
No need to reinvent the wheel.



More information about the wine-devel mailing list