diff options
author | Marc G. Fournier <scrappy@hub.org> | 1997-03-18 21:40:41 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1997-03-18 21:40:41 +0000 |
commit | d611b07dd70fac94bb958c44b543d21b861b48cc (patch) | |
tree | 1e42f53b00256cabc68fe55d4ffefa06556d8a76 /src/backend/utils/error/exc.c | |
parent | dcd2332a4d5da3f28e514c47ae5732cfc17d346e (diff) |
This is an attempt to get rid of some cruft...
According to man page under FreeBSD for sys_errlist[], strerror() should be
used instead...not sure if this will break other systems, so only changing
two files for now, and we'll see what "errors" it turns up
Diffstat (limited to 'src/backend/utils/error/exc.c')
-rw-r--r-- | src/backend/utils/error/exc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/backend/utils/error/exc.c b/src/backend/utils/error/exc.c index fddb7bb82ee..a3d71be92ae 100644 --- a/src/backend/utils/error/exc.c +++ b/src/backend/utils/error/exc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.11 1997/03/18 21:30:41 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.12 1997/03/18 21:40:41 scrappy Exp $ * * NOTE * XXX this code needs improvement--check for state violations and @@ -93,13 +93,6 @@ ExcPrint(Exception *excP, { extern int errno; extern int sys_nerr; -#if !defined(BSD44_derived) && \ - !defined(bsdi) && \ - !defined(bsdi_2_1) && \ - !defined(linuxalpha) && \ - !defined(__GLIBC__) - extern char *sys_errlist[]; -#endif /* ! bsd_derived */ #ifdef lint data = data; @@ -125,9 +118,8 @@ ExcPrint(Exception *excP, (void) fprintf(stderr, " (%ld)", detail); - if (errno > 0 && errno < sys_nerr && - sys_errlist[errno] != NULL && sys_errlist[errno][0] != '\0') - (void) fprintf(stderr, " [%s]", sys_errlist[errno]); + if (errno > 0 && errno < sys_nerr) + (void) fprintf(stderr, " [%s]", strerror(errno)); else if (errno != 0) (void) fprintf(stderr, " [Error %d]", errno); |