[issue1690] mercurial-1.2.1 fails to compile with -ansi on linux-gcc34

Sebastien Binet mercurial-bugs at selenic.com
Tue Jun 9 07:20:19 UTC 2009


New submission from Sebastien Binet <binet at cern.ch>:

hi,

as the title says it all, mercurial-1.2.1 fails to compile on my Scientific
Linux 4 box with gcc-3.4.2 when -ansi is passed to gcc:
mercurial/bdiff.c:102: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'cmp'
mercurial/bdiff.c: In function 'equatelines':

attached is a simple patch to fix that:

diff -urN orig.mercurial-1.2.1/mercurial/bdiff.c
mercurial-1.2.1/mercurial/bdiff.c
--- orig.mercurial-1.2.1/mercurial/bdiff.c      2009-03-20 23:58:00.000000000
+0100
+++ mercurial-1.2.1/mercurial/bdiff.c   2009-06-09 09:07:09.000000000 +0200
@@ -18,6 +18,10 @@
 # define inline
 #endif

+#ifdef __linux
+# define inline __inline
+#endif
+
 #ifdef _WIN32
 #ifdef _MSC_VER
 #define inline __inline

hth,
sebastien.

----------
messages: 9474
nosy: binet
priority: bug
status: unread
title: mercurial-1.2.1 fails to compile with -ansi on linux-gcc34

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1690>
____________________________________________________



More information about the Mercurial-devel mailing list