diff options
author | Hannes Magnusson <bjori@php.net> | 2011-09-06 15:09:15 +0000 |
---|---|---|
committer | Hannes Magnusson <bjori@php.net> | 2011-09-06 15:09:15 +0000 |
commit | 211806eb7360b608c57229d586d9ee0f085f1d73 (patch) | |
tree | a9e51e96cc67fd3150345af47ed0a86eab4da678 | |
parent | b1dd2f4e68a276ceeac52c761a46f4be5eb36db7 (diff) | |
download | php-git-211806eb7360b608c57229d586d9ee0f085f1d73.tar.gz |
Add a constant, READLINE_LIB, to be able to differenciate which lib is being used
-rw-r--r-- | ext/readline/readline_cli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index c7c5fabec6..7476b417b1 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -715,6 +715,12 @@ PHP_MINIT_FUNCTION(cli_readline) ZEND_INIT_MODULE_GLOBALS(cli_readline, cli_readline_init_globals, NULL); REGISTER_INI_ENTRIES(); +#if HAVE_LIBEDIT + REGISTER_STRING_CONSTANT("READLINE_LIB", "libedit", CONST_CS|CONST_PERSISTENT); +#else + REGISTER_STRING_CONSTANT("READLINE_LIB", "readline", CONST_CS|CONST_PERSISTENT); +#endif + GET_SHELL_CB(cb); if (cb) { cb->cli_shell_write = readline_shell_write; |