[MDEV-5613] m_string.h exports generic function names without a namespace prefix, like str2int Created: 2014-02-04  Updated: 2014-02-21  Resolved: 2014-02-21

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.35
Fix Version/s: 5.5.36

Type: Bug Priority: Major
Reporter: Dennis Schridde Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

MariaDB's m_string.h exports generic function names without a namespace prefix, like str2int, which leads to collisions with other project's internal functions. See for example the Gentoo/Linux bugreport for a problem with GLPK.

See Also: https://bugs.gentoo.org/show_bug.cgi?id=420095



 Comments   
Comment by Dennis Schridde [ 2014-02-04 ]

I also reported this issue against GLPK: http://lists.gnu.org/archive/html/bug-glpk/2014-02/msg00001.html

Andrew Makhorin correctly points out that MariaDB "should keep the namespace clean".

Comment by Sergei Golubchik [ 2014-02-04 ]

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

Generated at Thu Feb 08 07:05:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.