| 1 |
# errno_h.m4 |
| 2 |
# serial 19 |
| 3 |
dnl Copyright (C) 2004, 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 |
dnl This file is free software; the Free Software Foundation |
| 5 |
dnl gives unlimited permission to copy and/or distribute it, |
| 6 |
dnl with or without modifications, as long as this notice is preserved. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
AC_PREREQ([2.61]) |
| 10 |
|
| 11 |
AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], |
| 12 |
[ |
| 13 |
AC_REQUIRE([AC_PROG_CC]) |
| 14 |
|
| 15 |
dnl Through the dependency on module extensions-aix, _LINUX_SOURCE_COMPAT |
| 16 |
dnl gets defined already before this macro gets invoked. This persuades |
| 17 |
dnl AIX 7.3 errno.h to assign ENOTEMPTY a value different than EEXIST. |
| 18 |
|
| 19 |
AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ |
| 20 |
AC_EGREP_CPP([booboo],[ |
| 21 |
#include <errno.h> |
| 22 |
#if !defined ETXTBSY |
| 23 |
booboo |
| 24 |
#endif |
| 25 |
#if !defined ENOMSG |
| 26 |
booboo |
| 27 |
#endif |
| 28 |
#if !defined EIDRM |
| 29 |
booboo |
| 30 |
#endif |
| 31 |
#if !defined ENOLINK |
| 32 |
booboo |
| 33 |
#endif |
| 34 |
#if !defined EPROTO |
| 35 |
booboo |
| 36 |
#endif |
| 37 |
#if !defined EMULTIHOP |
| 38 |
booboo |
| 39 |
#endif |
| 40 |
#if !defined EBADMSG |
| 41 |
booboo |
| 42 |
#endif |
| 43 |
#if !defined EOVERFLOW |
| 44 |
booboo |
| 45 |
#endif |
| 46 |
#if !defined ENOTSUP |
| 47 |
booboo |
| 48 |
#endif |
| 49 |
#if !defined ENETRESET |
| 50 |
booboo |
| 51 |
#endif |
| 52 |
#if !defined ECONNABORTED |
| 53 |
booboo |
| 54 |
#endif |
| 55 |
#if !defined ESTALE |
| 56 |
booboo |
| 57 |
#endif |
| 58 |
#if !defined EDQUOT |
| 59 |
booboo |
| 60 |
#endif |
| 61 |
#if !defined ECANCELED |
| 62 |
booboo |
| 63 |
#endif |
| 64 |
#if !defined EOWNERDEAD |
| 65 |
booboo |
| 66 |
#endif |
| 67 |
#if !defined ENOTRECOVERABLE |
| 68 |
booboo |
| 69 |
#endif |
| 70 |
#if !defined EILSEQ |
| 71 |
booboo |
| 72 |
#endif |
| 73 |
#if !defined ESOCKTNOSUPPORT |
| 74 |
booboo |
| 75 |
#endif |
| 76 |
], |
| 77 |
[gl_cv_header_errno_h_complete=no], |
| 78 |
[gl_cv_header_errno_h_complete=yes]) |
| 79 |
]) |
| 80 |
if test $gl_cv_header_errno_h_complete = yes; then |
| 81 |
GL_GENERATE_ERRNO_H=false |
| 82 |
else |
| 83 |
gl_NEXT_HEADERS([errno.h]) |
| 84 |
GL_GENERATE_ERRNO_H=true |
| 85 |
fi |
| 86 |
]) |