diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-11-20 13:34:15 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-11-20 13:34:15 +0200 |
commit | 24be1c8460895ccec8a84e53966b324e35cac6c9 (patch) | |
tree | a9c2112a0013bc30c8385c2a96caf0519a7a81c3 /lisp/emacs-lisp/cl-extra.el | |
parent | bd715e3d3d214f61172beb78f858ac43d8ce0a78 (diff) | |
download | emacs-24be1c8460895ccec8a84e53966b324e35cac6c9.tar.gz emacs-24be1c8460895ccec8a84e53966b324e35cac6c9.tar.bz2 emacs-24be1c8460895ccec8a84e53966b324e35cac6c9.zip |
Improve MS-Windows implementation in dynlib.c
* src/dynlib.c [WINDOWSNT]: Include errno.h, lisp.h, and w32.h.
No need to include windows.h, as w32.h already does that.
<dynlib_last_err>: New static variable.
(dynlib_reset_last_error): New function.
(dynlib_open): Convert forward slashes to backslashes. Convert
file names from UTF-8 to either UTF-16 or the current ANSI
codepage, and call either LoadLibraryW or LoadLibraryA. If the
argument is NULL, return a handle to the main module, like
'dlopen' does. Record the error, if any, for use by dynlib_error.
(dynlib_sym): Check the handle for validity. Record the error, if
any, for use by dynlib_error.
(dynlib_error): Call w32_strerror to produce the error string, and
zero out the last error code, like dlerror does.
(dynlib_close): Check the handle for validity. Record the error,
if any, for use by dynlib_error. Don't call FreeLibrary with a
handle for the main module.
* src/w32.c (globals_of_w32): Call dynlib_reset_last_error.
Diffstat (limited to 'lisp/emacs-lisp/cl-extra.el')
0 files changed, 0 insertions, 0 deletions