File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -739,8 +739,24 @@ typedef cli_shell_callbacks_t *(__cdecl *get_cli_shell_callbacks)(void);
739739 } while(0)
740740
741741#else
742+ /*
743+ #ifdef COMPILE_DL_READLINE
744+ This dlsym() is always used as even the CGI SAPI is linked against "CLI"-only
745+ extensions. If that is being changed dlsym() should only be used when building
746+ this extension sharedto offer compatibility.
747+ */
748+ #define GET_SHELL_CB (cb ) \
749+ do { \
750+ (cb) = NULL; \
751+ cli_shell_callbacks_t *(*get_callbacks)(void); \
752+ get_callbacks = dlsym(RTLD_DEFAULT, "php_cli_get_shell_callbacks"); \
753+ if (get_callbacks) { \
754+ (cb) = get_callbacks(); \
755+ } \
756+ } while(0)
757+ /*#else
742758#define GET_SHELL_CB(cb) (cb) = php_cli_get_shell_callbacks()
743-
759+ #endif*/
744760#endif
745761
746762PHP_MINIT_FUNCTION (cli_readline )
You can’t perform that action at this time.
0 commit comments