llvm.org GIT mirror llvm / dbdf410
Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries." We may assume the type of 1st argument as PCSTR in PENUMLOADED_MODULES_CALLBACK. PSTR was in the ancient mingw32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262810 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 4 years ago
4 changed file(s) with 2 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
450450 set(HAVE_DIA_SDK 0)
451451 endif( MSVC )
452452
453 if( PURE_WINDOWS )
454 CHECK_CXX_SOURCE_COMPILES("
455 #include
456 #include
457 extern \"C\" void foo(PENUMLOADED_MODULES_CALLBACK);
458 extern \"C\" void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID));
459 int main(){return 0;}"
460 HAVE_ELMCB_PCSTR)
461 if( HAVE_ELMCB_PCSTR )
462 set(WIN32_ELMCB_PCSTR "PCSTR")
463 else()
464 set(WIN32_ELMCB_PCSTR "PSTR")
465 endif()
466 endif( PURE_WINDOWS )
467
468453 # FIXME: Signal handler return type, currently hardcoded to 'void'
469454 set(RETSIGTYPE void)
470455
554554 /* Define to 1 if your declares `struct tm'. */
555555 #undef TM_IN_SYS_TIME
556556
557 /* Type of 1st arg on ELM Callback */
558 #cmakedefine WIN32_ELMCB_PCSTR ${WIN32_ELMCB_PCSTR}
559
560557 /* Define to `int' if does not define. */
561558 #undef pid_t
562559
4444 }
4545
4646 static BOOL CALLBACK
47 ELM_Callback(WIN32_ELMCB_PCSTR ModuleName, DWORD64 ModuleBase,
47 ELM_Callback(PCSTR ModuleName, DWORD64 ModuleBase,
4848 ULONG ModuleSize, PVOID UserContext) {
4949 OpenedHandles->insert((HMODULE)ModuleBase);
5050 return TRUE;
240240 };
241241 }
242242
243 static BOOL CALLBACK findModuleCallback(WIN32_ELMCB_PCSTR ModuleName,
243 static BOOL CALLBACK findModuleCallback(PCSTR ModuleName,
244244 DWORD64 ModuleBase, ULONG ModuleSize,
245245 void *VoidData) {
246246 FindModuleData *Data = (FindModuleData*)VoidData;