[TUHS] History of strncpy

Warner Losh imp at bsdimp.com
Wed Jan 23 14:58:03 AEST 2013

A quick search of the archive shows that it appears, with strcpy, in v7, which suggests that this isn't the only reason...

On Jan 22, 2013, at 9:03 PM, Nevin Liber wrote:

> On another list I am on, a discussion about the history and purpose of strncpy has arisen.  The only reference I have found to it is <http://lwn.net/Articles/507432/>:
> The original reason for strncpy() was when directory names were limited to 14 chars. The other two bytes contained the inode number. For that particular case, strncpy() worked quite well.
> Is that really the reason it came into being?
> Just a bit curious,
> -- 
>  Nevin ":-)" Liber  <mailto:nevin at eviloverlord.com>  (847) 691-1404
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs

More information about the TUHS mailing list