bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-glpk] [Fwd: Re: src/glplib.h:28:17: error: conflicting types fo


From: Heinrich Schuchardt
Subject: Re: [Bug-glpk] [Fwd: Re: src/glplib.h:28:17: error: conflicting types for '_glp_lib_str2int' with gplk-4.52.1 and mariadb-5.5.32]
Date: Wed, 05 Feb 2014 20:33:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

Hello Andrew,

if you remove the following includes from src/glpsql.c, GLPK 4.52.1 still builds correctly against MySQL 5.5.35 on Linux x86_64.

//#include <my_global.h>
//#include <my_sys.h>

Best regards

Heinrich Schuchardt


On 05.02.2014 02:26, Andrew Makhorin wrote:
-------- Forwarded Message --------
From:
To: Andrew Makhorin <address@hidden>
Cc: address@hidden
Subject: Re: src/glplib.h:28:17: error: conflicting types for
'_glp_lib_str2int' with gplk-4.52.1 and mariadb-5.5.32
Date: Tue, 04 Feb 2014 21:39:24 +0100

Hello again!

Am Dienstag, 4. Februar 2014, 18:02:21 schrieb Andrew Makhorin:
The error occurs on compilation of glpsql.c because str2int is declared
in both glplib.h and in m_string.h, where the latter is included via
mysql.h. (I'd like to note that mysql.h is a public api header, so it
should keep the namespace clean, but it does not, having declared many
non-reserved non-prefixed identifiers in secondary headers.)

This is the reply by a MariaDB developer:

Sergei Golubchik commented on MDEV-5613:
----------------------------------------

This happens, because {{my_sys.h}} includes {{my_valgrind.h}}, which
includes {{m_string.h}}.

Actually, an application isn't supposed to include {{my_sys.h}}, but
{{m_string.h}} is particularly bad (or, should I say good? :)) in polluting
namespaces, so it's better to avoid it.

I suppose we can easily fix this by not including {{m_string.h}} in
{{my_valgrdind.h}}

So apparently gplsql.h should not include my_sys.h before including mysql.h.

--Dennis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]