OSDN Git Service

Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 7 Mar 2016 00:13:09 +0000 (00:13 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 7 Mar 2016 00:13:09 +0000 (00:13 +0000)
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

cmake/config-ix.cmake
include/llvm/Config/config.h.cmake
lib/Support/Windows/DynamicLibrary.inc
lib/Support/Windows/Signals.inc

index 2bbd15e..dd96b5c 100755 (executable)
@@ -451,21 +451,6 @@ else()
   set(HAVE_DIA_SDK 0)
 endif( MSVC )
 
-if( PURE_WINDOWS )
-  CHECK_CXX_SOURCE_COMPILES("
-    #include <windows.h>
-    #include <imagehlp.h>
-    extern \"C\" void foo(PENUMLOADED_MODULES_CALLBACK);
-    extern \"C\" void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID));
-    int main(){return 0;}"
-    HAVE_ELMCB_PCSTR)
-  if( HAVE_ELMCB_PCSTR )
-    set(WIN32_ELMCB_PCSTR "PCSTR")
-  else()
-    set(WIN32_ELMCB_PCSTR "PSTR")
-  endif()
-endif( PURE_WINDOWS )
-
 # FIXME: Signal handler return type, currently hardcoded to 'void'
 set(RETSIGTYPE void)
 
index b08796a..40520e2 100644 (file)
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 #undef TM_IN_SYS_TIME
 
-/* Type of 1st arg on ELM Callback */
-#cmakedefine WIN32_ELMCB_PCSTR ${WIN32_ELMCB_PCSTR}
-
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
index 17418b0..0506894 100644 (file)
@@ -45,7 +45,7 @@ static bool loadDebugHelp(void) {
 }
 
 static BOOL CALLBACK
-ELM_Callback(WIN32_ELMCB_PCSTR ModuleName, DWORD64 ModuleBase,
+ELM_Callback(PCSTR ModuleName, DWORD64 ModuleBase,
              ULONG ModuleSize, PVOID UserContext) {
   OpenedHandles->insert((HMODULE)ModuleBase);
   return TRUE;
index f40ca72..552bbff 100644 (file)
@@ -241,7 +241,7 @@ struct FindModuleData {
 };
 }
 
-static BOOL CALLBACK findModuleCallback(WIN32_ELMCB_PCSTR ModuleName,
+static BOOL CALLBACK findModuleCallback(PCSTR ModuleName,
                                         DWORD64 ModuleBase, ULONG ModuleSize,
                                         void *VoidData) {
   FindModuleData *Data = (FindModuleData*)VoidData;