X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstdbool.m4;h=3f6b4bfcbf44e62ca8d34aa42aa8c1bf7632679f;hb=db0f2ae452a6827f01474b79b55080e700afb974;hp=ed000c816376ddb7ab9072eefafdb5894e663cbb;hpb=458e682cf2b4d55424fe6c1e630a5fdf76c72746;p=gnulib.git diff --git a/m4/stdbool.m4 b/m4/stdbool.m4 index ed000c816..3f6b4bfcb 100644 --- a/m4/stdbool.m4 +++ b/m4/stdbool.m4 @@ -1,21 +1,9 @@ # Check for stdbool.h that conforms to C99. -# Copyright (C) 2002-2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +dnl Copyright (C) 2002-2004 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. # Prepare for substituting if it is not supported. @@ -40,7 +28,7 @@ AC_DEFUN([AM_STDBOOL_H], AC_SUBST([HAVE__BOOL]) ]) -# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf +# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf # have this macro built-in. AC_DEFUN([AC_HEADER_STDBOOL], @@ -59,7 +47,7 @@ AC_DEFUN([AC_HEADER_STDBOOL], "error: false is not 0" #endif #ifndef true - "error: false is not defined" + "error: true is not defined" #endif #if true != 1 "error: true is not 1" @@ -79,8 +67,14 @@ AC_DEFUN([AC_HEADER_STDBOOL], char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + ], + [ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l + + !m + !n + !o); ], - [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool])