comparison src/sysdll.c @ 1811:3fe1a35b705d

[xemacs-hg @ 2003-11-29 22:11:47 by james] Several module-related cleanups.
author james
date Sat, 29 Nov 2003 22:11:49 +0000
parents 9fc738581a9d
children 7fdde2d3ae5f
comparison
equal deleted inserted replaced
1810:6f8003dda838 1811:3fe1a35b705d
103 MAYBE_PREPEND_UNDERSCORE (n); 103 MAYBE_PREPEND_UNDERSCORE (n);
104 return (dll_var)dlsym ((void *)h, n); 104 return (dll_var)dlsym ((void *)h, n);
105 } 105 }
106 106
107 Lisp_Object 107 Lisp_Object
108 dll_error (dll_handle h) 108 dll_error ()
109 { 109 {
110 const Extbyte *msg; 110 const Extbyte *msg;
111 #if defined(HAVE_DLERROR) || defined(dlerror) 111 #if defined(HAVE_DLERROR) || defined(dlerror)
112 msg = (const Extbyte *) dlerror (); 112 msg = (const Extbyte *) dlerror ();
113 #elif defined(HAVE__DLERROR) 113 #elif defined(HAVE__DLERROR)
170 170
171 return (dll_var) handle; 171 return (dll_var) handle;
172 } 172 }
173 173
174 Lisp_Object 174 Lisp_Object
175 dll_error (dll_handle h) 175 dll_error ()
176 { 176 {
177 /* #### WTF?! Shouldn't this at least attempt to get strerror or 177 /* #### WTF?! Shouldn't this at least attempt to get strerror or
178 something? --hniksic */ 178 something? --hniksic */
179 return build_string ("Generic shared library error", Qnative); 179 return build_string ("Generic shared library error", Qnative);
180 } 180 }
223 { 223 {
224 return (dll_func) GetProcAddress ((HINSTANCE) h, n); 224 return (dll_func) GetProcAddress ((HINSTANCE) h, n);
225 } 225 }
226 226
227 Lisp_Object 227 Lisp_Object
228 dll_error (dll_handle h) 228 dll_error ()
229 { 229 {
230 CIbyte err[32]; 230 CIbyte err[32];
231 snprintf (err, 32, "Windows DLL Error %lu", GetLastError ()); 231 snprintf (err, 32, "Windows DLL Error %lu", GetLastError ());
232 return build_string (err); 232 return build_string (err);
233 } 233 }
296 if (sym == 0) return 0; 296 if (sym == 0) return 0;
297 return (dll_var)NSAddressOfSymbol(sym); 297 return (dll_var)NSAddressOfSymbol(sym);
298 } 298 }
299 299
300 Lisp_Object 300 Lisp_Object
301 dll_error (dll_handle h) 301 dll_error ()
302 { 302 {
303 NSLinkEditErrors c; 303 NSLinkEditErrors c;
304 int errorNumber; 304 int errorNumber;
305 const CIbyte *fileNameWithError, *errorString; 305 const CIbyte *fileNameWithError, *errorString;
306 NSLinkEditError(&c, &errorNumber, &fileNameWithError, &errorString); 306 NSLinkEditError(&c, &errorNumber, &fileNameWithError, &errorString);
337 { 337 {
338 return NULL; 338 return NULL;
339 } 339 }
340 340
341 Lisp_Object 341 Lisp_Object
342 dll_error (dll_handle h) 342 dll_error ()
343 { 343 {
344 return build_string ("Shared libraries not implemented on this system"); 344 return build_string ("Shared libraries not implemented on this system");
345 } 345 }
346 #endif /* System conditionals */ 346 #endif /* System conditionals */
347 347