version 1.3, 2009/04/02 06:51:44 |
version 1.4, 2009/04/02 16:37:40 |
Line 195 const struct actions mdoc_actions[MDOC_MAX] = { |
|
Line 195 const struct actions mdoc_actions[MDOC_MAX] = { |
|
|
|
|
|
#ifdef __linux__ |
#ifdef __linux__ |
extern size_t strlcpy(char *, const char *, size_t); |
|
extern size_t strlcat(char *, const char *, size_t); |
extern size_t strlcat(char *, const char *, size_t); |
#endif |
#endif |
|
|
Line 495 post_os(POST_ARGS) |
|
Line 494 post_os(POST_ARGS) |
|
|
|
if (m->meta.os) |
if (m->meta.os) |
free(m->meta.os); |
free(m->meta.os); |
|
|
|
buf[0] = 0; |
if ( ! concat(m, m->last->child, buf, sizeof(buf))) |
if ( ! concat(m, m->last->child, buf, sizeof(buf))) |
return(0); |
return(0); |
|
|
if (0 == buf[0]) { |
if (0 == buf[0]) { |
if (-1 == uname(&utsname)) |
if (-1 == uname(&utsname)) |
return(mdoc_err(m, "utsname")); |
return(mdoc_err(m, "utsname")); |
if (strlcpy(buf, utsname.sysname, 64) >= 64) |
if (strlcat(buf, utsname.sysname, 64) >= 64) |
return(verr(m, ETOOLONG)); |
return(verr(m, ETOOLONG)); |
if (strlcat(buf, " ", 64) >= 64) |
if (strlcat(buf, " ", 64) >= 64) |
return(verr(m, ETOOLONG)); |
return(verr(m, ETOOLONG)); |