diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-07-25 22:34:19 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-07-25 22:34:19 +0300 |
commit | 3d2d6b46bf3325c0273b35a202184ab09d38e0cd (patch) | |
tree | ad96062cc57a903fb25a0725210c8e12b84487df /ext.c | |
parent | 0fff60287fb9cc41288b3373f47031ab3dd597ac (diff) | |
download | egawk-3d2d6b46bf3325c0273b35a202184ab09d38e0cd.tar.gz egawk-3d2d6b46bf3325c0273b35a202184ab09d38e0cd.tar.bz2 egawk-3d2d6b46bf3325c0273b35a202184ab09d38e0cd.zip |
Start refactoring iop handling. Add readdir extension.
Diffstat (limited to 'ext.c')
-rw-r--r-- | ext.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -51,6 +51,9 @@ load_ext(const char *lib_name) if (do_traditional || do_posix) fatal(_("-l / @load are gawk extensions")); + if (lib_name == NULL) + fatal(_("load_ext: received NULL lib_name")); + if ((dl = dlopen(lib_name, flags)) == NULL) fatal(_("load_ext: cannot open library `%s' (%s)\n"), lib_name, dlerror()); @@ -60,6 +63,7 @@ load_ext(const char *lib_name) if (gpl_compat == NULL) fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), lib_name, dlerror()); + install_func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) dlsym(dl, INIT_FUNC); if (install_func == NULL) |