Alistair Delva | beaee83 | 2021-02-24 11:27:23 -0800 | [diff] [blame] | 1 | dnl Copyright 1997,2001-2003 Alain Knaff. |
| 2 | dnl This file is part of mtools. |
| 3 | dnl |
| 4 | dnl Mtools is free software: you can redistribute it and/or modify |
| 5 | dnl it under the terms of the GNU General Public License as published by |
| 6 | dnl the Free Software Foundation, either version 3 of the License, or |
| 7 | dnl (at your option) any later version. |
| 8 | dnl |
| 9 | dnl Mtools is distributed in the hope that it will be useful, |
| 10 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | dnl GNU General Public License for more details. |
| 13 | dnl |
| 14 | dnl You should have received a copy of the GNU General Public License |
| 15 | dnl along with Mtools. If not, see <http://www.gnu.org/licenses/>. |
| 16 | dnl |
| 17 | dnl Check for declaration of sys_errlist in one of stdio.h and errno.h. |
| 18 | dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration. |
| 19 | dnl Reported by Keith Bostic. |
| 20 | AC_DEFUN([CF_SYS_ERRLIST], |
| 21 | [ |
| 22 | AC_MSG_CHECKING([declaration of sys_errlist]) |
| 23 | AC_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])]) |
| 31 | AC_MSG_RESULT($cf_cv_dcl_sys_errlist) |
| 32 | test $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 |
| 34 | dnl |