|
|
|
dnl Copyright (C) 2004, 2006, 2008-2023 Free Software Foundation, Inc. |
|
dnl This file is free software |
|
dnl gives unlimited permission to copy and/or distribute it, |
|
dnl with or without modifications, as long as this notice is preserved. |
|
|
|
AC_PREREQ([2.61]) |
|
|
|
AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], |
|
[ |
|
AC_REQUIRE([AC_PROG_CC]) |
|
AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ |
|
AC_EGREP_CPP([booboo],[ |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
|
|
booboo |
|
|
|
], |
|
[gl_cv_header_errno_h_complete=no], |
|
[gl_cv_header_errno_h_complete=yes]) |
|
]) |
|
if test $gl_cv_header_errno_h_complete = yes |
|
GL_GENERATE_ERRNO_H=false |
|
else |
|
gl_NEXT_HEADERS([errno.h]) |
|
GL_GENERATE_ERRNO_H=true |
|
fi |
|
gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) |
|
gl_REPLACE_ERRNO_VALUE([ENOLINK]) |
|
gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) |
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN([gl_REPLACE_ERRNO_VALUE], |
|
[ |
|
if $GL_GENERATE_ERRNO_H |
|
AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ |
|
AC_EGREP_CPP([yes],[ |
|
|
|
|
|
yes |
|
|
|
], |
|
[gl_cv_header_errno_h_]$1[=yes], |
|
[gl_cv_header_errno_h_]$1[=no]) |
|
if test $gl_cv_header_errno_h_]$1[ = no |
|
AC_EGREP_CPP([yes],[ |
|
|
|
|
|
|
|
yes |
|
|
|
], [gl_cv_header_errno_h_]$1[=hidden]) |
|
if test $gl_cv_header_errno_h_]$1[ = hidden |
|
dnl The macro exists but is hidden. |
|
dnl Define it to the same value. |
|
AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ |
|
|
|
|
|
|
|
|
|
|
|
]) |
|
fi |
|
fi |
|
]) |
|
case $gl_cv_header_errno_h_]$1[ in |
|
yes | no) |
|
]$1[_HIDDEN=0; ]$1[_VALUE= |
|
;; |
|
*) |
|
]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" |
|
;; |
|
esac |
|
AC_SUBST($1[_HIDDEN]) |
|
AC_SUBST($1[_VALUE]) |
|
fi |
|
]) |
|
|