mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Add configure check for sys_nerr, to end all discussions.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.74 2000/12/18 00:44:47 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.75 2001/01/09 18:40:14 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -44,11 +44,6 @@
|
||||
|
||||
extern int errno;
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# define sys_nerr _sys_nerr
|
||||
#endif
|
||||
extern int sys_nerr;
|
||||
|
||||
extern CommandDest whereToSendOutput;
|
||||
|
||||
#ifdef ENABLE_SYSLOG
|
||||
@@ -140,8 +135,7 @@ elog(int lev, const char *fmt, ...)
|
||||
if (lev <= DEBUG && Debugfile < 0)
|
||||
return; /* ignore debug msgs if noplace to send */
|
||||
|
||||
/* BeOS doesn't have sys_nerr and should be able to use strerror()... */
|
||||
#ifndef __BEOS__
|
||||
#ifdef HAVE_SYS_NERR
|
||||
/* save errno string for %m */
|
||||
if (errno < sys_nerr && errno >= 0)
|
||||
errorstr = strerror(errno);
|
||||
@@ -152,7 +146,7 @@ elog(int lev, const char *fmt, ...)
|
||||
}
|
||||
#else
|
||||
errorstr = strerror(errno);
|
||||
#endif /* __BEOS__ */
|
||||
#endif
|
||||
|
||||
if (lev == ERROR || lev == FATAL)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.32 2000/10/28 23:53:00 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.33 2001/01/09 18:40:14 petere Exp $
|
||||
*
|
||||
* NOTE
|
||||
* XXX this code needs improvement--check for state violations and
|
||||
@@ -96,10 +96,6 @@ EnableExceptionHandling(bool on)
|
||||
|
||||
|
||||
extern int errno;
|
||||
#ifdef __CYGWIN__
|
||||
# define sys_nerr _sys_nerr
|
||||
#endif
|
||||
extern int sys_nerr;
|
||||
|
||||
static void
|
||||
ExcPrint(Exception *excP,
|
||||
@@ -131,7 +127,7 @@ ExcPrint(Exception *excP,
|
||||
|
||||
fprintf(stderr, " (%ld)", detail);
|
||||
|
||||
#ifndef __BEOS__
|
||||
#ifdef HAVE_SYS_NERR
|
||||
if (errno > 0 && errno < sys_nerr)
|
||||
#else
|
||||
if (errno > 0)
|
||||
|
||||
Reference in New Issue
Block a user