Incorporate strerror_r() into src/port/snprintf.c, too.
Tom Lane <tgl@sss.pgh.pa.us>
Incorporate strerror_r() into src/port/snprintf.c, too. This provides the features that used to exist in useful_strerror() for users of strerror_r(), too. Also, standardize on the GNU convention that strerror_r returns a char pointer that may not be NULL. I notice that libpq's win32.c contains a variant version of strerror_r that probably ought to be folded into strerror.c. But lacking a Windows environment, I should leave that to somebody else. Discussion: https://postgr.es/m/2975.1526862605@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/include/port.h | modified | +5 −2 |
| src/interfaces/libpq/fe-auth.c | modified | +3 −3 |
| src/interfaces/libpq/fe-connect.c | modified | +9 −9 |
| src/interfaces/libpq/fe-lobj.c | modified | +7 −7 |
| src/interfaces/libpq/fe-misc.c | modified | +1 −1 |
| src/interfaces/libpq/fe-secure.c | modified | +2 −2 |
| src/interfaces/libpq/fe-secure-openssl.c | modified | +6 −6 |
| src/interfaces/libpq/libpq-int.h | modified | +1 −1 |
| src/port/strerror.c | modified | +61 −24 |
| src/port/thread.c | modified | +0 −27 |
| src/test/thread/thread_test.c | modified | +4 −1 |
Discussion
- Allowing printf("%m") only where it actually works 50 messages · 2018-05-21 → 2018-10-09