[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] [Fwd: Re: [Fwd: Re: src/glplib.h:28:17: error: conflicting ty
From: |
Andrew Makhorin |
Subject: |
[Bug-glpk] [Fwd: Re: [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: |
Thu, 06 Feb 2014 13:16:16 +0400 |
-------- Forwarded Message --------
From: Dennis Schridde <address@hidden>
To: Heinrich Schuchardt <address@hidden>
Cc: Andrew Makhorin <address@hidden>, address@hidden
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 22:22:56 +0100
Thanks, Heinrich!
Your suggestion works here, so I presented it as a patch [1] to the downstream
bugreport [2] against Gentoo/Linux.
--Dennis
[1] https://bugs.gentoo.org/attachment.cgi?id=369656
[2] https://bugs.gentoo.org/show_bug.cgi?id=420095
Am Mittwoch, 5. Februar 2014, 20:33:14 schrieb Heinrich Schuchardt:
> 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-glpk] [Fwd: Re: [Fwd: Re: src/glplib.h:28:17: error: conflicting types for '_glp_lib_str2int' with gplk-4.52.1 and mariadb-5.5.32]],
Andrew Makhorin <=