GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 93b1001c authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

Don't #include <tlhelp32.h> when compiling with gcc, as it isn't provided.

2000-07-19  Tor Lillqvist  <tml@iki.fi>

* gmodule-win32.c: Don't #include <tlhelp32.h> when compiling with gcc, as it
isn't provided. Declaration of a needed struct (from
www.microsoft.com) inserted instead.
parent 9556b490
2000-07-19 Tor Lillqvist <tml@iki.fi>
* gmodule-win32.c: Don't #include <tlhelp32.h> when compiling with
gcc, as it isn't provided. Declaration of a needed struct (from
www.microsoft.com) inserted instead.
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in: New file, with gmodule stuff
......
......@@ -33,7 +33,34 @@
#include <stdio.h>
#include <windows.h>
#ifdef __MSVC__
#include <tlhelp32.h>
#else
/* The w32api headers supplied with the mingw gcc don't have
* tlhelp32.h. We really only need the MODULEENTRY32 struct and the
* TH32CS_SNAPMODULE value, so provide them here.
*/
#define MAX_MODULE_NAME32 255
typedef struct
{
DWORD dwSize;
DWORD th32ModuleID;
DWORD th32ProcessID;
DWORD GlblcntUsage;
DWORD ProccntUsage;
BYTE *modBaseAddr;
DWORD modBaseSize;
HMODULE hModule;
char szModule[MAX_MODULE_NAME32 + 1];
char szExePath[MAX_PATH];
} MODULEENTRY32;
#define TH32CS_SNAPMODULE 8
#endif
static void
set_error (void)
......@@ -82,10 +109,10 @@ find_in_any_module_using_toolhelp (const gchar *symbol_name)
typedef HANDLE (WINAPI *PFNCREATETOOLHELP32SNAPSHOT)(DWORD, DWORD);
static PFNCREATETOOLHELP32SNAPSHOT pfnCreateToolhelp32Snapshot = NULL;
typedef BOOL (WINAPI *PFNMODULE32FIRST)(HANDLE, LPMODULEENTRY32);
typedef BOOL (WINAPI *PFNMODULE32FIRST)(HANDLE, MODULEENTRY32*);
static PFNMODULE32FIRST pfnModule32First= NULL;
typedef BOOL (WINAPI *PFNMODULE32NEXT)(HANDLE, LPMODULEENTRY32);
typedef BOOL (WINAPI *PFNMODULE32NEXT)(HANDLE, MODULEENTRY32*);
static PFNMODULE32NEXT pfnModule32Next = NULL;
static HMODULE kernel32;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment