From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 75E986DE0355 for ; Wed, 21 Sep 2016 16:15:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4GbyBpQ7NJwX for ; Wed, 21 Sep 2016 16:15:22 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 2B01C6DE0319 for ; Wed, 21 Sep 2016 16:15:22 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1bmqjP-0000mx-Ga; Wed, 21 Sep 2016 19:15:11 -0400 Received: (nullmailer pid 28150 invoked by uid 1000); Wed, 21 Sep 2016 23:15:19 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] build system: choose gnu99 as a C standard Date: Wed, 21 Sep 2016 20:15:15 -0300 Message-Id: <20160921231515.28095-1-david@tethera.net> X-Mailer: git-send-email 2.9.3 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 23:15:23 -0000 Apparently pre 5.1 gcc defaulted to gnu89, but we decided it was ok to use some c99 features. '-std=c99' by itself is not enough for notmuch to compile. '-std=gnu99' seems to work with clang and gcc, so I'm not convinced configuration support is needed. --- Our use of c99 loop variable declarations breaks the build on travis, because old gcc defaults to c89+extensions Makefile.local | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.local b/Makefile.local index 5587cd2..d1b0585 100644 --- a/Makefile.local +++ b/Makefile.local @@ -44,7 +44,8 @@ GPG_FILE=$(SHA1_FILE).asc PV_FILE=bindings/python/notmuch/version.py # Smash together user's values with our extra values -FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS) +STD_CFLAGS := -std=gnu99 +FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(STD_CFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS) FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS) FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch ifeq ($(LIBDIR_IN_LDCONFIG),0) -- 2.9.3