mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove rangechecks on errno; just call strerror unconditionally. This
eliminates a raft of portability issues, including whether sys_nerr exists, whether the platform has any valid negative errnos, etc. The downside is minimal: errno shouldn't ever contain an invalid value anyway, and if it does, reasonably modern versions of strerror will not choke. This rangecheck idea seemed good at the time, but it's clearly a net loss, and I apologize to all concerned for having ever put it in.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# Macros that test various C library quirks
|
||||
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.7 2001/01/10 17:07:18 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.8 2001/01/22 23:28:50 tgl Exp $
|
||||
|
||||
|
||||
# PGAC_VAR_INT_TIMEZONE
|
||||
@ -124,19 +124,3 @@ if test x"$pgac_cv_header_strings_both" = x"yes"; then
|
||||
AC_DEFINE([STRING_H_WITH_STRINGS_H], 1,
|
||||
[Define if string.h and strings.h may both be included])
|
||||
fi])
|
||||
|
||||
|
||||
# PGAC_VAR_SYS_NERR
|
||||
# -----------------
|
||||
# Check if the global variable 'sys_nerr' exists. If so, define
|
||||
# HAVE_SYS_NERR.
|
||||
AC_DEFUN([PGAC_VAR_SYS_NERR],
|
||||
[AC_CACHE_CHECK([for sys_nerr], pgac_cv_var_sys_nerr,
|
||||
[AC_TRY_LINK([extern int sys_nerr;
|
||||
int x;],
|
||||
[x = sys_nerr;],
|
||||
[pgac_cv_var_sys_nerr=yes],
|
||||
[pgac_cv_var_sys_nerr=no])])
|
||||
if test x"$pgac_cv_var_sys_nerr" = xyes ; then
|
||||
AC_DEFINE(HAVE_SYS_NERR,, [Set to 1 if you have the global variable sys_nerr])
|
||||
fi])# PGAC_VAR_SYS_NERR
|
||||
|
Reference in New Issue
Block a user