Commit b2a17038 authored by Bruce Momjian's avatar Bruce Momjian

Have strerror_r return "Unknown error".

parent a63d2168
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/port/thread.c,v 1.21 2004/06/07 22:39:45 momjian Exp $ * $PostgreSQL: pgsql/src/port/thread.c,v 1.22 2004/06/08 01:45:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -75,7 +75,7 @@ pqStrerror(int errnum, char *strerrbuf, size_t buflen) ...@@ -75,7 +75,7 @@ pqStrerror(int errnum, char *strerrbuf, size_t buflen)
if (strerror_r(errnum, strerrbuf, buflen) == 0) if (strerror_r(errnum, strerrbuf, buflen) == 0)
return strerrbuf; return strerrbuf;
else else
return NULL; return "Unknown error";
#else #else
/* GNU libc */ /* GNU libc */
return strerror_r(errnum, strerrbuf, buflen); return strerror_r(errnum, strerrbuf, buflen);
...@@ -109,7 +109,6 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer, ...@@ -109,7 +109,6 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
*/ */
*result = getpwuid_r(uid, resultbuf, buffer, buflen); *result = getpwuid_r(uid, resultbuf, buffer, buflen);
#endif #endif
#else #else
/* no getpwuid_r() available, just use getpwuid() */ /* no getpwuid_r() available, just use getpwuid() */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment