annotate m4/errno_h.m4 @ 267:bec6d2480f08 2.6

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