Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-19206: cmake: support new libedit interface #1001

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

micmac1
Copy link
Contributor

@micmac1 micmac1 commented Dec 9, 2018

libedit changed it's interface a while ago. MariaDB's cmake file doesn't
recognize the new interface, the compile test fails:

/mariadb-10.2.19/CMakeFiles/CMakeTmp/src.cxx: In function 'int main(int, char**)':
/mariadb-10.2.19/CMakeFiles/CMakeTmp/src.cxx:6:47: error: invalid conversion from 'char*' to 'int' [-fpermissive]
int res= (*rl_completion_entry_function)(0,0);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Fix this by adding a detection for the new interface as well.

In client/mysql.cc the ifdefs for the new readline interface are
extended to also check for the new libedit interface. They work the same
way.

Run-tested on a MIPS machine.

Signed-off-by: Sebastian Kemper sebastian_ml@gmx.net

@micmac1
Copy link
Contributor Author

micmac1 commented Dec 9, 2018

Hi all,

This pull request is under new BSD license.

Kind regards,
Seb

@an3l an3l added the license-bsd-new Contributed under BSD-new license label Dec 9, 2018
@an3l an3l added this to the 10.4 milestone Dec 9, 2018
@an3l an3l requested a review from vaintroub December 9, 2018 22:55
micmac1 added a commit to micmac1/packages that referenced this pull request Dec 15, 2018
libedit changed its interface a while back. mariadb currently does not
recognize this interface and instead uses a static old readline version.
It does not link in the system readline due to licence incompatibility.

This commit adds a patch that enables mariadb to detect and use the
system libedit. The patch was sent upstream already ([1]).

[1] MariaDB/server#1001

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
thiagoricciardi pushed a commit to thiagoricciardi/packages that referenced this pull request Apr 3, 2019
libedit changed its interface a while back. mariadb currently does not
recognize this interface and instead uses a static old readline version.
It does not link in the system readline due to licence incompatibility.

This commit adds a patch that enables mariadb to detect and use the
system libedit. The patch was sent upstream already ([1]).

[1] MariaDB/server#1001

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
@an3l an3l changed the title cmake: support new libedit interface MDEV-19206: cmake: support new libedit interface Apr 7, 2019
@micmac1
Copy link
Contributor Author

micmac1 commented Apr 8, 2019 via email

libedit changed it's interface a while ago. MariaDB's cmake file doesn't
recognize the new interface, the compile test fails:

/mariadb-10.2.19/CMakeFiles/CMakeTmp/src.cxx: In function 'int main(int, char**)':
/mariadb-10.2.19/CMakeFiles/CMakeTmp/src.cxx:6:47: error: invalid conversion from 'char*' to 'int' [-fpermissive]
  int res= (*rl_completion_entry_function)(0,0);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Fix this by adding a detection for the new interface as well.

Run-tested on a MIPS machine.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
@micmac1
Copy link
Contributor Author

micmac1 commented Apr 10, 2019 via email

Copy link
Member

@vaintroub vaintroub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, I just have to trust that it was tested somewhere, because we do not have new libedit anywhere to check.

@vaintroub vaintroub merged commit d992163 into MariaDB:10.4 Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
license-bsd-new Contributed under BSD-new license
4 participants