On Sat, May 05, 2007 at 04:57:55PM -0400, [EMAIL PROTECTED] wrote:
> > > > sysutils/libstatgrab (new)
> > > > http://openbsd.rutgers.edu/libstatgrab.tar
> > 
> > maybe you could drop the duplicated code for strl* and add a line like
> > #define sg_strlcpy strlcpy
> 
> Oops.  That was only supposed to go upstream.

I'm not sure what you're trying to say.

I mean the authors have included strlcpy and friends, which is good for
systems that do not have it, but we want to use the version we already
have in libc.  So you can do something like

#ifdef __OpenBSD__
#define sg_strlcpy strlcpy
#else
(strlcpy source)
#endif

or better, adapt configure.in to check for strlcpy, and then use
#ifdef HAVE_STRLCPY
and such in the source.

Your patch for tools.c is wrong:

        char *new;
        ...

-       strcpy(new, src);
+       sg_strlcpy(new, src, sizeof(new));

sizeof(new) will just return the size of a pointer.
We want to avoid strl* patches in the ports tree, so maybe you can ask
the author to fix this the right way.

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

Reply via email to