author | Camm Maguire <camm@debian.org> | 2015年10月02日 17:04:34 +0000 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2015年10月02日 17:04:34 +0000 |
commit | 209cd4b2c64e60a94650e43e5ea9f4ac93f939b6 (patch) | |
tree | a5c185f70b89898f14a9dc0e3a5d6b67e179794c /gcl/o/prelink.c | |
parent | 5bf1ad1f69a45396857c28822fb9b83d9f7876d4 (diff) | |
download | gcl-macportm.tar.gz |
-rw-r--r-- | gcl/o/prelink.c | 31 |
diff --git a/gcl/o/prelink.c b/gcl/o/prelink.c new file mode 100644 index 000000000..9ce197d7a --- /dev/null +++ b/gcl/o/prelink.c @@ -0,0 +1,31 @@ +#define NO_PRELINK_UNEXEC_DIVERSION + +#include "include.h" + +#if !defined(__MINGW32__) && !defined(__CYGWIN__) +extern FILE *stdin __attribute__((weak)); +extern FILE *stderr __attribute__((weak)); +extern FILE *stdout __attribute__((weak)); + +#if RL_READLINE_VERSION < 0x0600 +extern Function *rl_completion_entry_function __attribute__((weak)); +extern char *rl_readline_name __attribute__((weak)); +#else +extern rl_compentry_func_t *rl_completion_entry_function __attribute__((weak)); +extern const char *rl_readline_name __attribute__((weak)); +#endif +#endif + +void +prelink_init(void) { + + my_stdin=stdin; + my_stdout=stdout; + my_stderr=stderr; +#ifdef HAVE_READLINE + my_rl_completion_entry_function_ptr=(void *)&rl_completion_entry_function; + my_rl_readline_name_ptr=(void *)&rl_readline_name; +#endif + +} + |