annotate m4/errno_h.m4 @ 285:9010796c6253 2.3 2.3.1

Generated manual for distribution
author lost
date Fri, 24 Apr 2009 22:36:09 +0000
parents 2cb097e760a5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
1 # errno_h.m4 serial 2
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
2 dnl Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
6
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
7 AC_DEFUN([gl_HEADER_ERRNO_H],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
8 [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
9 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
10 dnl once only, before all statements that occur in other macros.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
11 AC_REQUIRE([gl_HEADER_ERRNO_H_BODY])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
12 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
13
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
14 AC_DEFUN([gl_HEADER_ERRNO_H_BODY],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
15 [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
16 AC_REQUIRE([AC_PROG_CC])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
17 AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
18 AC_EGREP_CPP(booboo,[
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
19 #include <errno.h>
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
20 #if !defined ENOMSG
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
21 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
22 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
23 #if !defined EIDRM
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
24 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
25 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
26 #if !defined ENOLINK
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
27 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
28 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
29 #if !defined EPROTO
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
30 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
31 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
32 #if !defined EMULTIHOP
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
33 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
34 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
35 #if !defined EBADMSG
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
36 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
37 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
38 #if !defined EOVERFLOW
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
39 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
40 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
41 #if !defined ENOTSUP
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
42 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
43 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
44 #if !defined ECANCELED
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
45 booboo
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
46 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
47 ],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
48 [gl_cv_header_errno_h_complete=no],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
49 [gl_cv_header_errno_h_complete=yes])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
50 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
51 if test $gl_cv_header_errno_h_complete = yes; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
52 ERRNO_H=''
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
53 else
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
54 gl_CHECK_NEXT_HEADERS([errno.h])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
55 ERRNO_H='errno.h'
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
56 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
57 AC_SUBST([ERRNO_H])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
58 gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
59 gl_REPLACE_ERRNO_VALUE([ENOLINK])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
60 gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
61 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
62
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
63 # Assuming $1 = EOVERFLOW.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
64 # The EOVERFLOW errno value ought to be defined in <errno.h>, according to
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
65 # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
66 # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
67 # Check for the value of EOVERFLOW.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
68 # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
69 AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
70 [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
71 if test -n "$ERRNO_H"; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
72 AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
73 AC_EGREP_CPP(yes,[
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
74 #include <errno.h>
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
75 #ifdef ]$1[
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
76 yes
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
77 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
78 ],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
79 [gl_cv_header_errno_h_]$1[=yes],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
80 [gl_cv_header_errno_h_]$1[=no])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
81 if test $gl_cv_header_errno_h_]$1[ = no; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
82 AC_EGREP_CPP(yes,[
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
83 #define _XOPEN_SOURCE_EXTENDED 1
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
84 #include <errno.h>
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
85 #ifdef ]$1[
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
86 yes
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
87 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
88 ], [gl_cv_header_errno_h_]$1[=hidden])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
89 if test $gl_cv_header_errno_h_]$1[ = hidden; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
90 dnl The macro exists but is hidden.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
91 dnl Define it to the same value.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
92 AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
93 #define _XOPEN_SOURCE_EXTENDED 1
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
94 #include <errno.h>
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
95 /* The following two lines are a workaround against an autoconf-2.52 bug. */
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
96 #include <stdio.h>
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
97 #include <stdlib.h>
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
98 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
99 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
100 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
101 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
102 case $gl_cv_header_errno_h_]$1[ in
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
103 yes | no)
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
104 ]$1[_HIDDEN=0; ]$1[_VALUE=
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
105 ;;
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
106 *)
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
107 ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
108 ;;
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
109 esac
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
110 AC_SUBST($1[_HIDDEN])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
111 AC_SUBST($1[_VALUE])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
112 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
113 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
114
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
115 dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
116 dnl Remove this when we can assume autoconf >= 2.61.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
117 m4_ifdef([AC_COMPUTE_INT], [], [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
118 AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
119 ])