From 423585a6a133cdf8863dfaf0984af98029f6af11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 1 Oct 2012 18:34:46 -0400 Subject: [PATCH] libwinpr-path: fix build on Linux --- .gitignore | 4 ++-- client/X11/CMakeLists.txt | 2 +- winpr/include/winpr/path.h | 1 + winpr/include/winpr/tchar.h | 2 ++ winpr/libwinpr/heap/heap.c | 2 ++ winpr/libwinpr/interlocked/CMakeLists.txt | 1 + winpr/libwinpr/path/CMakeLists.txt | 1 + winpr/libwinpr/path/path.c | 2 ++ winpr/libwinpr/path/test/TestPathCchAddBackslash.c | 4 ++-- 9 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index e65348cdf90b..bd2a0d06dd8b 100644 --- a/.gitignore +++ b/.gitignore @@ -43,9 +43,9 @@ RelWithDebInfo cunit/test_freerdp client/X11/xfreerdp client/Mac/xcode -client/test/freerdp-test +client/Sample/sfreerdp client/DirectFB/dfreerdp -server/test/tfreerdp-server +server/Sample/sfreerdp-server server/X11/xfreerdp-server xcode diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index 2bf4efc828e2..9805790670a3 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(MODULE_NAME "wfreerdp") +set(MODULE_NAME "xfreerdp") set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS") include(FindXmlto) diff --git a/winpr/include/winpr/path.h b/winpr/include/winpr/path.h index 432c12c20c3c..d823e15be9ba 100644 --- a/winpr/include/winpr/path.h +++ b/winpr/include/winpr/path.h @@ -22,6 +22,7 @@ #include #include +#include #include //#define HAVE_PATHCCH_H 1 diff --git a/winpr/include/winpr/tchar.h b/winpr/include/winpr/tchar.h index 9b3cedc62fac..5d43a0c74d91 100644 --- a/winpr/include/winpr/tchar.h +++ b/winpr/include/winpr/tchar.h @@ -34,11 +34,13 @@ typedef WCHAR TCHAR; #define _tprintf wprintf #define _tcsdup _wcsdup #define _tcscmp wcscmp +#define _tcscpy wcscpy #else typedef CHAR TCHAR; #define _tprintf printf #define _tcsdup _strdup #define _tcscmp strcmp +#define _tcscpy strcpy #endif typedef TCHAR *LPTSTR, *LPTCH; diff --git a/winpr/libwinpr/heap/heap.c b/winpr/libwinpr/heap/heap.c index 5de8cba21717..a53b2eff0bd2 100644 --- a/winpr/libwinpr/heap/heap.c +++ b/winpr/libwinpr/heap/heap.c @@ -23,6 +23,8 @@ #include +#include + /* Memory Allocation: http://msdn.microsoft.com/en-us/library/hk1k7x6x.aspx */ /* Memory Management Functions: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366781/ */ diff --git a/winpr/libwinpr/interlocked/CMakeLists.txt b/winpr/libwinpr/interlocked/CMakeLists.txt index c6edc4cee626..7aea061f1406 100644 --- a/winpr/libwinpr/interlocked/CMakeLists.txt +++ b/winpr/libwinpr/interlocked/CMakeLists.txt @@ -32,6 +32,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SO if(WITH_MONOLITHIC_BUILD) else() + target_link_libraries(${MODULE_NAME} winpr-crt) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/winpr/libwinpr/path/CMakeLists.txt b/winpr/libwinpr/path/CMakeLists.txt index 0c19c75fddf6..00080ee0af81 100644 --- a/winpr/libwinpr/path/CMakeLists.txt +++ b/winpr/libwinpr/path/CMakeLists.txt @@ -32,6 +32,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SO if(WITH_MONOLITHIC_BUILD) else() + target_link_libraries(${MODULE_NAME} winpr-heap) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/winpr/libwinpr/path/path.c b/winpr/libwinpr/path/path.c index bc54e3494d6c..ce0a80aaa651 100644 --- a/winpr/libwinpr/path/path.c +++ b/winpr/libwinpr/path/path.c @@ -21,6 +21,8 @@ #include "config.h" #endif +#include + #include HRESULT PathCchAddBackslashA(PSTR pszPath, size_t cchPath) diff --git a/winpr/libwinpr/path/test/TestPathCchAddBackslash.c b/winpr/libwinpr/path/test/TestPathCchAddBackslash.c index b237b6b27497..a4e4a6df85ce 100644 --- a/winpr/libwinpr/path/test/TestPathCchAddBackslash.c +++ b/winpr/libwinpr/path/test/TestPathCchAddBackslash.c @@ -21,7 +21,7 @@ int TestPathCchAddBackslash(int argc, char* argv[]) if (status != S_OK) { - _tprintf(_T("PathCchAddBackslash status: 0x%08X\n"), status); + _tprintf(_T("PathCchAddBackslash status: 0x%08X\n"), (int) status); return -1; } @@ -39,7 +39,7 @@ int TestPathCchAddBackslash(int argc, char* argv[]) if (status != S_FALSE) { - _tprintf(_T("PathCchAddBackslash status: 0x%08X\n"), status); + _tprintf(_T("PathCchAddBackslash status: 0x%08X\n"), (int) status); return -1; }