Add credit to OpenBSD for strlcat and strlcpy
This commit is contained in:
parent
4fb243af7b
commit
bcdb57b4dd
1 changed files with 5 additions and 1 deletions
6
util.c
6
util.c
|
@ -21,6 +21,11 @@ lfail(lua_State *L, const char* mesg)
|
||||||
return LFAIL_RET;
|
return LFAIL_RET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* String concatenation and copying functions
|
||||||
|
* from OpenBSD lib/libc/string/strlcat.c and
|
||||||
|
* lib/libc/string/strlcpy.c respectively
|
||||||
|
*/
|
||||||
#ifndef BSD
|
#ifndef BSD
|
||||||
/*
|
/*
|
||||||
* Appends src to string dst of size dsize (unlike strncat, dsize is the
|
* Appends src to string dst of size dsize (unlike strncat, dsize is the
|
||||||
|
@ -86,7 +91,6 @@ strlcpy(char *dst, const char *src, size_t dsize)
|
||||||
return(src - osrc - 1); /* count does not include NUL */
|
return(src - osrc - 1); /* count does not include NUL */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prepends t to s.
|
* Prepends t to s.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue