File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 7
7
#define _isatty isatty
8
8
#define _fileno fileno
9
9
#include <dlfcn.h>
10
- #define GETPROCADDRESS (h , p ) dlsym(h, p)
11
10
#include <signal.h>
12
11
#include <stdint.h>
13
12
#include <locale.h>
@@ -65,11 +64,11 @@ readlineinit() {
65
64
#endif
66
65
return 0 ;
67
66
}
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" );
73
72
return 1 ;
74
73
}
75
74
You can’t perform that action at this time.
0 commit comments