Here is a question about GNU strerror_r() on a 32-bit Linux box. Given
the following code:
char msg[512];
int errcode = access("nonexis tent file", F_OK);
if (errcode != 0)
{
char * result = strerror(errcod e, msg, 512);
. . .
}
What I find is that result is returned properly, but msg is empty.
Whoops! I just noticed that this is a possibility explained in
strerror(3). Apparently the GNU strerror_r() acts differently than the
preferred XSI-compliant version.
My bad, but at least posting here helped me find it myself.
Carry on.
Chris
--
Just in terms of allocation of time resources, religion is not very
efficient. There's a lot more I could be doing on a Sunday morning.
-- Bill Gates
the following code:
char msg[512];
int errcode = access("nonexis tent file", F_OK);
if (errcode != 0)
{
char * result = strerror(errcod e, msg, 512);
. . .
}
What I find is that result is returned properly, but msg is empty.
Whoops! I just noticed that this is a possibility explained in
strerror(3). Apparently the GNU strerror_r() acts differently than the
preferred XSI-compliant version.
My bad, but at least posting here helped me find it myself.
Carry on.
Chris
--
Just in terms of allocation of time resources, religion is not very
efficient. There's a lot more I could be doing on a Sunday morning.
-- Bill Gates