[C++/mingw] gdb-dlfcn.c casts

Fixes:

../../src/gdb/gdb-dlfcn.c: In function 'void* gdb_dlsym(void*, const char*)':
../../src/gdb/gdb-dlfcn.c:105:49: error: invalid conversion from 'void*' to 'HMODULE {aka HINSTANCE__*}' [-fpermissive]
   return (void *) GetProcAddress (handle, symbol);
                                                 ^

gdb/ChangeLog:
2015-11-17  Pedro Alves  <palves@redhat.com>

	* gdb-dlfcn.c (gdb_dlsym, gdb_dlclose) [__MINGW32__]: Add casts to
	HMODULE.
This commit is contained in:
Pedro Alves 2015-11-17 15:17:44 +00:00
parent 0ae1c716a1
commit 2986367f8e
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2015-11-17 Pedro Alves <palves@redhat.com>
* gdb-dlfcn.c (gdb_dlsym, gdb_dlclose) [__MINGW32__]: Add casts to
HMODULE.
2015-11-17 Pedro Alves <palves@redhat.com>
* exec.c (exec_file_attach, symfile_bfd_open) [__GO32__ || _WIN32

View File

@ -102,7 +102,7 @@ gdb_dlsym (void *handle, const char *symbol)
#ifdef HAVE_DLFCN_H
return dlsym (handle, symbol);
#elif __MINGW32__
return (void *) GetProcAddress (handle, symbol);
return (void *) GetProcAddress ((HMODULE) handle, symbol);
#endif
}
@ -112,7 +112,7 @@ gdb_dlclose (void *handle)
#ifdef HAVE_DLFCN_H
return dlclose (handle);
#elif __MINGW32__
return !((int) FreeLibrary (handle));
return !((int) FreeLibrary ((HMODULE) handle));
#endif
}