summaryrefslogtreecommitdiffstats
path: root/gl/m4/errno_h.m4
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-01-31 13:46:01 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-01-31 13:46:01 (GMT)
commite8bd88d1fcded01ccd066572eeaae1b507989cb3 (patch)
treec8e7be6c07c6f635f6e803e6a6ba9e7a95fee7c0 /gl/m4/errno_h.m4
parent2ad962c13473607ca0d974bfaa516a0ed53ec73d (diff)
downloadmonitoring-plugins-e8bd88d1fcded01ccd066572eeaae1b507989cb3.tar.gz
Sync with the latest Gnulib code 668c0b8ffa
Diffstat (limited to 'gl/m4/errno_h.m4')
-rw-r--r--gl/m4/errno_h.m420
1 files changed, 7 insertions, 13 deletions
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index c813ea5..4c70d22 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,9 +1,11 @@
1# errno_h.m4 serial 12 1# errno_h.m4 serial 14
2dnl Copyright (C) 2004, 2006, 2008-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2004, 2006, 2008-2023 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7AC_PREREQ([2.61])
8
7AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], 9AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
8[ 10[
9 AC_REQUIRE([AC_PROG_CC]) 11 AC_REQUIRE([AC_PROG_CC])
@@ -66,13 +68,11 @@ booboo
66 [gl_cv_header_errno_h_complete=yes]) 68 [gl_cv_header_errno_h_complete=yes])
67 ]) 69 ])
68 if test $gl_cv_header_errno_h_complete = yes; then 70 if test $gl_cv_header_errno_h_complete = yes; then
69 ERRNO_H='' 71 GL_GENERATE_ERRNO_H=false
70 else 72 else
71 gl_NEXT_HEADERS([errno.h]) 73 gl_NEXT_HEADERS([errno.h])
72 ERRNO_H='errno.h' 74 GL_GENERATE_ERRNO_H=true
73 fi 75 fi
74 AC_SUBST([ERRNO_H])
75 AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"])
76 gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) 76 gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
77 gl_REPLACE_ERRNO_VALUE([ENOLINK]) 77 gl_REPLACE_ERRNO_VALUE([ENOLINK])
78 gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) 78 gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
@@ -86,7 +86,7 @@ booboo
86# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. 86# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
87AC_DEFUN([gl_REPLACE_ERRNO_VALUE], 87AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
88[ 88[
89 if test -n "$ERRNO_H"; then 89 if $GL_GENERATE_ERRNO_H; then
90 AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ 90 AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
91 AC_EGREP_CPP([yes],[ 91 AC_EGREP_CPP([yes],[
92#include <errno.h> 92#include <errno.h>
@@ -129,9 +129,3 @@ yes
129 AC_SUBST($1[_VALUE]) 129 AC_SUBST($1[_VALUE])
130 fi 130 fi
131]) 131])
132
133dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
134dnl Remove this when we can assume autoconf >= 2.61.
135m4_ifdef([AC_COMPUTE_INT], [], [
136 AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
137])