diff options
Diffstat (limited to 'src/backend/utils')
-rw-r--r-- | src/backend/utils/error/elog.c | 15 | ||||
-rw-r--r-- | src/backend/utils/error/exc.c | 15 |
2 files changed, 4 insertions, 26 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 6a842bd469f..1b70912a162 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.78 2001/01/21 00:59:26 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.79 2001/01/22 23:28:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -43,10 +43,6 @@ extern int errno; -#ifdef HAVE_SYS_NERR -extern int sys_nerr; -#endif - extern CommandDest whereToSendOutput; #ifdef ENABLE_SYSLOG @@ -139,14 +135,7 @@ elog(int lev, const char *fmt, ...) return; /* ignore debug msgs if noplace to send */ /* Save error str before calling any function that might change errno */ - if (errno >= 0 -#ifdef HAVE_SYS_NERR - && errno <= sys_nerr -#endif - ) - errorstr = strerror(errno); - else - errorstr = NULL; + errorstr = strerror(errno); /* * Some strerror()s return an empty string for out-of-range errno. * This is ANSI C spec compliant, but not exactly useful. diff --git a/src/backend/utils/error/exc.c b/src/backend/utils/error/exc.c index 6f5420712e4..86cd070f0c5 100644 --- a/src/backend/utils/error/exc.c +++ b/src/backend/utils/error/exc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.34 2001/01/21 00:59:26 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.35 2001/01/22 23:28:52 tgl Exp $ * * NOTE * XXX this code needs improvement--check for state violations and @@ -26,10 +26,6 @@ extern int errno; -#ifdef HAVE_SYS_NERR -extern int sys_nerr; -#endif - static void ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data, ExcMessage message); @@ -115,14 +111,7 @@ ExcPrint(Exception *excP, #endif /* Save error str before calling any function that might change errno */ - if (errno >= 0 -#ifdef HAVE_SYS_NERR - && errno <= sys_nerr -#endif - ) - errorstr = strerror(errno); - else - errorstr = NULL; + errorstr = strerror(errno); /* * Some strerror()s return an empty string for out-of-range errno. * This is ANSI C spec compliant, but not exactly useful. |