Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c3f9371

Browse files
committed
Add configure check for sys_nerr, to end all discussions.
1 parent af26d6a commit c3f9371

File tree

9 files changed

+110
-71
lines changed

9 files changed

+110
-71
lines changed

config/c-library.m4

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros that test various C library quirks
2-
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.5 2000/11/03 18:43:51 petere Exp $
2+
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.6 2001/01/09 18:40:13 petere Exp $
33

44

55
# PGAC_VAR_INT_TIMEZONE
@@ -123,3 +123,18 @@ if test x"$pgac_cv_header_strings_both" = x"yes"; then
123123
AC_DEFINE([STRING_H_WITH_STRINGS_H], 1,
124124
[Define if string.h and strings.h may both be included])
125125
fi])
126+
127+
128+
# PGAC_VAR_SYS_NERR
129+
# -----------------
130+
# Check if the global variable 'sys_nerr' exists. If so, define
131+
# HAVE_SYS_NERR.
132+
AC_DEFUN([PGAC_VAR_SYS_NERR],
133+
[AC_CACHE_CHECK([for sys_nerr], pgac_cv_var_sys_nerr,
134+
[AC_TRY_LINK([extern int sys_nerr;],
135+
[int x = sys_nerr;],
136+
[pgac_cv_var_sys_nerr=yes],
137+
[pgac_cv_var_sys_nerr=no])])
138+
if test x"$pgac_cv_var_sys_nerr" = xyes ; then
139+
AC_DEFINE(HAVE_SYS_NERR,, [Set to 1 if you have the global variable sys_nerr])
140+
fi])# PGAC_VAR_SYS_NERR

0 commit comments

Comments
 (0)