> Return value of strerror_r is wrong; must be char*

Current upstream (2.44 in fact, but I think unchanged since 2.39)
reads as below.  Where is the problem?

Cheers,

Michael
(upstream maintainer) 


SYNOPSIS
       #include <string.h>

       char *strerror(int errnum);

       char *strerror_r(int errnum, char *buf, size_t buflen);
                               /* GNU-specific strerror_r() */

       #define _XOPEN_SOURCE 600
       #include <string.h>

       int strerror_r(int errnum, char *buf, size_t buflen);
                               /* XSI-compliant strerror_r() */

DESCRIPTION
[...]

       The XSI-compliant strerror_r() is  preferred  for  portable
       applications.  It returns the error string in the user-sup-
       plied buffer buf of length buflen.

       The GNU-specific strerror_r() returns a pointer to a string
       containing the error message.  This may be either a pointer
       to a string that the function stores in buf, or  a  pointer
       to  some  (immutable)  static  string (in which case buf is
       unused).  If the function stores a string in buf,  then  at
       most  buflen  bytes are stored (the string may be truncated
       if buflen is too small) and the string  always  includes  a
       terminating null byte.

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/, 
read the HOWTOHELP file and grep the source 
files for 'FIXME'.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to