File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77#define _isatty isatty
88#define _fileno fileno
99#include <dlfcn.h>
10- #define GETPROCADDRESS (h , p ) dlsym(h, p)
1110#include <signal.h>
1211#include <stdint.h>
1312#include <locale.h>
@@ -65,11 +64,11 @@ readlineinit() {
6564#endif
6665 return 0 ;
6766 }
68- add_history = (ADD_HISTORY )GETPROCADDRESS (hreadline , "add_history" );
69- read_history = (READ_HISTORY )GETPROCADDRESS (hreadline , "read_history" );
70- write_history = (WRITE_HISTORY )GETPROCADDRESS (hreadline , "write_history" );
71- readline = (PREADLINE )GETPROCADDRESS (hreadline , "readline" );
72- using_history = (USING_HISTORY )GETPROCADDRESS (hreadline , "using_history" );
67+ add_history = (ADD_HISTORY )dlsym (hreadline , "add_history" );
68+ read_history = (READ_HISTORY )dlsym (hreadline , "read_history" );
69+ write_history = (WRITE_HISTORY )dlsym (hreadline , "write_history" );
70+ readline = (PREADLINE )dlsym (hreadline , "readline" );
71+ using_history = (USING_HISTORY )dlsym (hreadline , "using_history" );
7372 return 1 ;
7473}
7574
You can’t perform that action at this time.
0 commit comments