Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Fix inconsistent GetCLRFunction definitions #8472

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dlls/mscoree/mscoree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ HINSTANCE g_hThisInst; // This library.

#include <process.h> // for __security_init_cookie()

void* __stdcall GetCLRFunction(LPCSTR FunctionName);
#include <utilcode.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The utilcode.h is already included at line 9.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I'll remove this line.


extern "C" IExecutionEngine* __stdcall IEE();

Expand Down
2 changes: 2 additions & 0 deletions src/inc/utilcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -5766,4 +5766,6 @@ extern SpinConstants g_SpinConstants;

// ======================================================================================

void* __stdcall GetCLRFunction(LPCSTR FunctionName);

#endif // __UtilCode_h__
2 changes: 1 addition & 1 deletion src/vm/ceemain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ extern "C" HRESULT __cdecl CorDBGetInterface(DebugInterface** rcInterface);


#if !defined(FEATURE_CORECLR) && !defined(CROSSGEN_COMPILE)
void* __stdcall GetCLRFunction(LPCSTR FunctionName);
#include <utilcode.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to the block of includes at the beginning of the file

Copy link
Author

@parjong parjong Dec 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that common.h (under vm) already includes utilcode.h. Could you let me know your opinion on which change will be better (move to the beginning, or remove)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove it.


// Pointer to the activated CLR interface provided by the shim.
ICLRRuntimeInfo *g_pCLRRuntime = NULL;
Expand Down
3 changes: 2 additions & 1 deletion src/vm/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "posterror.h"
#include "eemessagebox.h"
#include "newapis.h"
#include "utilcode.h"

#include <shlobj.h>

Expand Down Expand Up @@ -2551,7 +2552,7 @@ extern BOOL EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem);
extern void ShutdownRuntimeWithoutExiting(int exitCode);
extern BOOL IsRuntimeStarted(DWORD *pdwStartupFlags);

void * GetCLRFunction(LPCSTR FunctionName)
void * __stdcall GetCLRFunction(LPCSTR FunctionName)
{

void* func = NULL;
Expand Down