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
 # Smash together user's values with our extra values
$(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
+STD_CFLAGS := -std=gnu99
$(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
 FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch

notmuch mailing list

Reply via email to