- 论坛徽章:
- 0
|
请高手指点函数strerror_r
原帖由 "lenovo" 发表:
你的man页上的原型是这样的吗?
我看到的怎么是返回int类型?
CONFORMING TO
SVID 3, POSIX, BSD 4.3, ISO/IEC 9899:1990 (C89).
strerror_r() with prototype as given above is specified by SUSv3, and
was in use under Digital Unix and HP Unix. An incompatible function,
with prototype
char *strerror_r(int errnum, char *buf, size_t n);
is a GNU extension used by glibc (since 2.0), and must be regarded as
obsolete in view of SUSv3. The GNU version may, but need not, use the
user-supplied buffer. If it does, the result may be truncated in case
the supplied buffer is too small. The result is always NUL-terminated. |
|