#include "Schedule.h"
#include "Sparks.h"
#include "RtsTypeable.h"
+#include "Timer.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
SymX(stackOverflow) \
SymX(stg_CAF_BLACKHOLE_info) \
SymX(awakenBlockedQueue) \
+ SymX(startTimer) \
SymX(stg_CHARLIKE_closure) \
SymX(stg_MVAR_CLEAN_info) \
SymX(stg_MVAR_DIRTY_info) \
sprintf(buf, "%s.DLL", dll_name);
instance = LoadLibrary(buf);
if (instance == NULL) {
- sprintf(buf, "%s.DRV", dll_name); // KAA: allow loading of drivers (like winspool.drv)
- instance = LoadLibrary(buf);
- if (instance == NULL) {
- stgFree(buf);
-
- /* LoadLibrary failed; return a ptr to the error msg. */
- return "addDLL: unknown error";
- }
+ if (GetLastError() != ERROR_MOD_NOT_FOUND) goto error;
+ // KAA: allow loading of drivers (like winspool.drv)
+ sprintf(buf, "%s.DRV", dll_name);
+ instance = LoadLibrary(buf);
+ if (instance == NULL) {
+ if (GetLastError() != ERROR_MOD_NOT_FOUND) goto error;
+ // #1883: allow loading of unix-style libfoo.dll DLLs
+ sprintf(buf, "lib%s.DLL", dll_name);
+ instance = LoadLibrary(buf);
+ if (instance == NULL) {
+ goto error;
+ }
+ }
}
stgFree(buf);
opened_dlls = o_dll;
return NULL;
+
+error:
+ stgFree(buf);
+ sysErrorBelch(dll_name);
+
+ /* LoadLibrary failed; return a ptr to the error msg. */
+ return "addDLL: could not load DLL";
+
# else
barf("addDLL: not implemented on this platform");
# endif
+ sym->Value);
} else {
copyName ( sym->Name, strtab, symbol, 1000-1 );
- S = (UInt32) lookupLocalSymbol( oc, symbol );
- if ((void*)S != NULL) goto foundit;
S = (UInt32) lookupSymbol( symbol );
if ((void*)S != NULL) goto foundit;
zapTrailingAtSign ( symbol );
- S = (UInt32) lookupLocalSymbol( oc, symbol );
- if ((void*)S != NULL) goto foundit;
S = (UInt32) lookupSymbol( symbol );
if ((void*)S != NULL) goto foundit;
/* Newline first because the interactive linker has printed "linking..." */