aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2018-02-07 12:00:00 +0100
committerRechi <Rechi@users.noreply.github.com>2018-02-07 12:00:00 +0100
commitb70f5b6faa63c79f1953539712a3cc8229939ce6 (patch)
tree6fa388f59ef2444c9e9fbdfc82d72ac97fe3c3c4
parentd2e365d24f9c3d4772f351f9bceda056587020d7 (diff)
[cleanup][PlatformDefs] remove LPCSTR
-rw-r--r--xbmc/cores/DllLoader/dll.cpp12
-rw-r--r--xbmc/cores/DllLoader/dll.h12
-rw-r--r--xbmc/cores/DllLoader/dll_tracker_library.cpp4
-rw-r--r--xbmc/cores/DllLoader/dll_tracker_library.h4
-rw-r--r--xbmc/network/UdpClient.cpp2
-rw-r--r--xbmc/platform/linux/ConvUtils.h2
-rw-r--r--xbmc/platform/linux/PlatformDefs.h3
7 files changed, 19 insertions, 20 deletions
diff --git a/xbmc/cores/DllLoader/dll.cpp b/xbmc/cores/DllLoader/dll.cpp
index 2e176f4791..1df1da1f3c 100644
--- a/xbmc/cores/DllLoader/dll.cpp
+++ b/xbmc/cores/DllLoader/dll.cpp
@@ -49,7 +49,7 @@ char* getpath(char *buf, const char *full)
}
}
-extern "C" HMODULE __stdcall dllLoadLibraryExtended(LPCSTR lib_file, LPCSTR sourcedll)
+extern "C" HMODULE __stdcall dllLoadLibraryExtended(const char* lib_file, const char* sourcedll)
{
char libname[MAX_PATH + 1] = {};
char libpath[MAX_PATH + 1] = {};
@@ -104,7 +104,7 @@ extern "C" HMODULE __stdcall dllLoadLibraryExtended(LPCSTR lib_file, LPCSTR sour
return NULL;
}
-extern "C" HMODULE __stdcall dllLoadLibraryA(LPCSTR file)
+extern "C" HMODULE __stdcall dllLoadLibraryA(const char* file)
{
return dllLoadLibraryExtended(file, NULL);
}
@@ -114,7 +114,7 @@ extern "C" HMODULE __stdcall dllLoadLibraryA(LPCSTR file)
#define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010
-extern "C" HMODULE __stdcall dllLoadLibraryExExtended(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags, LPCSTR sourcedll)
+extern "C" HMODULE __stdcall dllLoadLibraryExExtended(const char* lpLibFileName, HANDLE hFile, DWORD dwFlags, const char* sourcedll)
{
char strFlags[512];
strFlags[0] = '\0';
@@ -129,7 +129,7 @@ extern "C" HMODULE __stdcall dllLoadLibraryExExtended(LPCSTR lpLibFileName, HAND
return dllLoadLibraryExtended(lpLibFileName, sourcedll);
}
-extern "C" HMODULE __stdcall dllLoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
+extern "C" HMODULE __stdcall dllLoadLibraryExA(const char* lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
return dllLoadLibraryExExtended(lpLibFileName, hFile, dwFlags, NULL);
}
@@ -152,7 +152,7 @@ extern "C" int __stdcall dllFreeLibrary(HINSTANCE hLibModule)
return 1;
}
-extern "C" intptr_t (*__stdcall dllGetProcAddress(HMODULE hModule, LPCSTR function))(void)
+extern "C" intptr_t (*__stdcall dllGetProcAddress(HMODULE hModule, const char* function))(void)
{
uintptr_t loc = (uintptr_t)_ReturnAddress();
@@ -221,7 +221,7 @@ extern "C" intptr_t (*__stdcall dllGetProcAddress(HMODULE hModule, LPCSTR functi
return (intptr_t(*)(void)) address;
}
-extern "C" HMODULE WINAPI dllGetModuleHandleA(LPCSTR lpModuleName)
+extern "C" HMODULE WINAPI dllGetModuleHandleA(const char* lpModuleName)
{
/*
If the file name extension is omitted, the default library extension .dll is appended.
diff --git a/xbmc/cores/DllLoader/dll.h b/xbmc/cores/DllLoader/dll.h
index 2bf4ac647b..169f31dd1c 100644
--- a/xbmc/cores/DllLoader/dll.h
+++ b/xbmc/cores/DllLoader/dll.h
@@ -22,11 +22,11 @@
*
*/
-extern "C" HMODULE __stdcall dllLoadLibraryExtended(LPCSTR file, LPCSTR sourcedll);
-extern "C" HMODULE __stdcall dllLoadLibraryA(LPCSTR file);
-extern "C" HMODULE __stdcall dllLoadLibraryExExtended(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags, LPCSTR sourcedll);
-extern "C" HMODULE __stdcall dllLoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
+extern "C" HMODULE __stdcall dllLoadLibraryExtended(const char* file, const char* sourcedll);
+extern "C" HMODULE __stdcall dllLoadLibraryA(const char* file);
+extern "C" HMODULE __stdcall dllLoadLibraryExExtended(const char* lpLibFileName, HANDLE hFile, DWORD dwFlags, const char* sourcedll);
+extern "C" HMODULE __stdcall dllLoadLibraryExA(const char* lpLibFileName, HANDLE hFile, DWORD dwFlags);
extern "C" int __stdcall dllFreeLibrary(HINSTANCE hLibModule);
-extern "C" intptr_t (*__stdcall dllGetProcAddress(HMODULE hModule, LPCSTR function))(void);
-extern "C" HMODULE WINAPI dllGetModuleHandleA(LPCSTR lpModuleName);
+extern "C" intptr_t (*__stdcall dllGetProcAddress(HMODULE hModule, const char* function))(void);
+extern "C" HMODULE WINAPI dllGetModuleHandleA(const char* lpModuleName);
diff --git a/xbmc/cores/DllLoader/dll_tracker_library.cpp b/xbmc/cores/DllLoader/dll_tracker_library.cpp
index 8d9f8eae1b..368f41f975 100644
--- a/xbmc/cores/DllLoader/dll_tracker_library.cpp
+++ b/xbmc/cores/DllLoader/dll_tracker_library.cpp
@@ -93,7 +93,7 @@ extern "C" void tracker_library_free_all(DllTrackInfo* pInfo)
}
}
-extern "C" HMODULE __stdcall track_LoadLibraryA(LPCSTR file)
+extern "C" HMODULE __stdcall track_LoadLibraryA(const char* file)
{
uintptr_t loc = (uintptr_t)_ReturnAddress();
@@ -107,7 +107,7 @@ extern "C" HMODULE __stdcall track_LoadLibraryA(LPCSTR file)
return hHandle;
}
-extern "C" HMODULE __stdcall track_LoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
+extern "C" HMODULE __stdcall track_LoadLibraryExA(const char* lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
uintptr_t loc = (uintptr_t)_ReturnAddress();
diff --git a/xbmc/cores/DllLoader/dll_tracker_library.h b/xbmc/cores/DllLoader/dll_tracker_library.h
index 3be1ab4efa..811035d3b2 100644
--- a/xbmc/cores/DllLoader/dll_tracker_library.h
+++ b/xbmc/cores/DllLoader/dll_tracker_library.h
@@ -24,6 +24,6 @@
extern "C" void tracker_library_free_all(DllTrackInfo* pInfo);
-extern "C" HMODULE __stdcall track_LoadLibraryA(LPCSTR file);
-extern "C" HMODULE __stdcall track_LoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
+extern "C" HMODULE __stdcall track_LoadLibraryA(const char* file);
+extern "C" HMODULE __stdcall track_LoadLibraryExA(const char* lpLibFileName, HANDLE hFile, DWORD dwFlags);
extern "C" int __stdcall track_FreeLibrary(HINSTANCE hLibModule);
diff --git a/xbmc/network/UdpClient.cpp b/xbmc/network/UdpClient.cpp
index 3440a04f8c..62c8cefcfb 100644
--- a/xbmc/network/UdpClient.cpp
+++ b/xbmc/network/UdpClient.cpp
@@ -238,7 +238,7 @@ bool CUdpClient::DispatchNextCommand()
do
{
- ret = sendto(client_socket, (LPCSTR) command.binary, command.binarySize, 0, (struct sockaddr *) & command.address, sizeof(command.address));
+ ret = sendto(client_socket, (const char*) command.binary, command.binarySize, 0, (struct sockaddr *) & command.address, sizeof(command.address));
}
while (ret == -1);
diff --git a/xbmc/platform/linux/ConvUtils.h b/xbmc/platform/linux/ConvUtils.h
index 6964368e05..8d66850090 100644
--- a/xbmc/platform/linux/ConvUtils.h
+++ b/xbmc/platform/linux/ConvUtils.h
@@ -20,7 +20,7 @@
*
*/
-#include "PlatformDefs.h" // UINT DWORD LPCSTR ...
+#include "PlatformDefs.h" // UINT DWORD ...
DWORD GetLastError();
VOID SetLastError(DWORD dwErrCode);
diff --git a/xbmc/platform/linux/PlatformDefs.h b/xbmc/platform/linux/PlatformDefs.h
index d85e51fe24..97389a9f48 100644
--- a/xbmc/platform/linux/PlatformDefs.h
+++ b/xbmc/platform/linux/PlatformDefs.h
@@ -152,11 +152,10 @@ typedef void* LPVOID;
#define INVALID_HANDLE_VALUE ((HANDLE)~0U)
typedef BYTE* LPBYTE;
typedef DWORD* LPDWORD;
-typedef CONST CHAR* LPCSTR;
#ifdef UNICODE
typedef CONST WCHAR* LPCTSTR;
#else
-typedef LPCSTR LPCTSTR;
+typedef CONST CHAR* LPCTSTR;
#endif
#define MAXWORD 0xffff