From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XAhQb-0005lr-KE for mharc-grub-devel@gnu.org; Fri, 25 Jul 2014 11:29:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAhQT-0005k2-JL for grub-devel@gnu.org; Fri, 25 Jul 2014 11:28:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAhQP-0005jQ-9x for grub-devel@gnu.org; Fri, 25 Jul 2014 11:28:53 -0400 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:57183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAhQG-0005ii-Ey; Fri, 25 Jul 2014 11:28:40 -0400 Received: by mail-la0-f42.google.com with SMTP id pv20so3220350lab.15 for ; Fri, 25 Jul 2014 08:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=9b5SVauwdaZilg8CC/6lxdp8kDr8uSsMiFpKhFFfjJs=; b=q50vD0KQf7UhcbekeY3i/5681iqcvcaVMwBRh7qGfOB2xUGP2vNGVc9nvUgDYJ821P 6nguIdMQxTWqjeNzlNuY9WvBoVLMC/5IeoJpP8XI94oK0VTCJePc+jBZcmSjXjmDV1vP LUR9+PoTstFgqo5YewkLab1jTXBq0B5cuSoBkjAZapF7uXG/dCZUnAzkNd0kHDj/aoq2 7P/nQXbS4rG50hBKyc6pc3Naz2eteIxqzSkjpRo59SSS55ykBdw47TWK6eJq4b8n2uj0 JZ0TEe6+90PQlqtB6Ls1iH974QFA9vvpa90HpfuCh2B5d70gwPlFIqqgEdgWn9BDVq2R FuQA== X-Received: by 10.152.25.229 with SMTP id f5mr2980948lag.87.1406302118180; Fri, 25 Jul 2014 08:28:38 -0700 (PDT) Received: from localhost.localdomain (ppp94-29-76-101.pppoe.spdop.ru. [94.29.76.101]) by mx.google.com with ESMTPSA id ec17sm16065760lbb.24.2014.07.25.08.28.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jul 2014 08:28:37 -0700 (PDT) From: Andrey Borzenkov To: bug-gnulib@gnu.org Subject: [PATCH] Do not use inline in argp.h on FreeBSD Date: Fri, 25 Jul 2014 19:28:24 +0400 Message-Id: <1406302104-30958-1-git-send-email-arvidjaar@gmail.com> X-Mailer: git-send-email 1.8.4.5 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22a Cc: grub-devel@gnu.org, zaphod@berentweb.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:28:59 -0000 This fixes this error: In file included from util/grub-mkimage.c:54:0: ./grub-core/gnulib/argp.h:627:49: error: '__sbistype' is static but used in inline function '_option_is_short' which is not static [-Werror] cc1: all warnings being treated as errors gmake[2]: *** [util/grub_mkimage-grub-mkimage.o] Error 1 Treat FreeBSD similar to Apple and do not try inlines. It currently does it for GCC only, as this is what had been tested. Reported-By: Beeblebrox Tested-By: Beeblebrox Signed-off-by: Andrey Borzenkov --- m4/extern-inline.m4 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 240150e..009b928 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -24,7 +24,10 @@ AC_DEFUN([gl_EXTERN_INLINE], . OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and for clang but remains for g++; see . - Perhaps Apple will fix this some day. */ + Perhaps Apple will fix this some day. + + Suppress use of inlines on FreeBSD with GCC similar to Apple. It fails to + compile arpg.h due to static inlines in ctype.h */ #if (defined __APPLE__ \ && (defined __header_inline \ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ @@ -36,7 +39,8 @@ AC_DEFUN([gl_EXTERN_INLINE], # define _GL_EXTERN_INLINE_APPLE_BUG #endif #if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__) \ + && !defined __FreeBSD__ \ : (199901L <= __STDC_VERSION__ \ && !defined __HP_cc \ && !(defined __SUNPRO_C && __STDC__))) \ @@ -45,7 +49,7 @@ AC_DEFUN([gl_EXTERN_INLINE], # define _GL_EXTERN_INLINE extern inline # define _GL_EXTERN_INLINE_IN_USE #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) + && !defined _GL_EXTERN_INLINE_APPLE_BUG && !defined __FreeBSD__) # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -- tg: (5acee27..) FreeBSD-ctype.h (depends on: master)