blob: 50b2e2162b486e2c1f79f3d7cfdcade08155ee82 [file] [log] [blame]
Alistair Delvabeaee832021-02-24 11:27:23 -08001dnl Copyright 1997,2001-2003 Alain Knaff.
2dnl This file is part of mtools.
3dnl
4dnl Mtools is free software: you can redistribute it and/or modify
5dnl it under the terms of the GNU General Public License as published by
6dnl the Free Software Foundation, either version 3 of the License, or
7dnl (at your option) any later version.
8dnl
9dnl Mtools is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12dnl GNU General Public License for more details.
13dnl
14dnl You should have received a copy of the GNU General Public License
15dnl along with Mtools. If not, see <http://www.gnu.org/licenses/>.
16dnl
17dnl Check for declaration of sys_errlist in one of stdio.h and errno.h.
18dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration.
19dnl Reported by Keith Bostic.
20AC_DEFUN([CF_SYS_ERRLIST],
21[
22AC_MSG_CHECKING([declaration of sys_errlist])
23AC_CACHE_VAL(cf_cv_dcl_sys_errlist,[
24 AC_TRY_COMPILE([
25#include <stdio.h>
26#include <sys/types.h>
27#include <errno.h> ],
28 [char *c = (char *) *sys_errlist],
29 [cf_cv_dcl_sys_errlist=yes],
30 [cf_cv_dcl_sys_errlist=no])])
31AC_MSG_RESULT($cf_cv_dcl_sys_errlist)
32test $cf_cv_dcl_sys_errlist = no || AC_DEFINE([DECL_SYS_ERRLIST],1,[Define when sys_errlist is defined in the standard include files])
33])dnl
34dnl