On 03.07.2017 12:44, Nicolai Hähnle wrote:
On 03.07.2017 09:43, Gustaw Smolarczyk wrote:
2017-07-03 6:10 GMT+02:00 Robert Foss <[email protected]>:
On Sun, 2017-07-02 at 21:06 -0700, Matt Turner wrote:
Otherwise known as strlcpy()?

I didn't realize this, a wrapper would be needed for all platformsou
that don't support it natively.

Do you know which platforms support strlcpy?


Rob.

I think various BSD variants support strlcpy ([1] as an example).

I'd suggest to keep the patches mostly the same, but rename util_strncpy to util_strlcpy. That way, the name is aligned with the standard library function that many platforms have, and the code is still fully portable.

Keep in mind to adjust also the commit messages when you make the change.

Of course, it would be even nicer to just rename it to strlcpy and add some #ifdef magic to figure out which platforms it's needed on.




Cheers,
Nicolai



Gustaw

[1] https://www.freebsd.org/cgi/man.cgi?query=strlcpy&sektion=3
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev





--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to