libwinpr-path: fix build on Linux

This commit is contained in:
Marc-André Moreau 2012-10-01 18:34:46 -04:00
parent 9155bf3eab
commit 423585a6a1
9 changed files with 14 additions and 5 deletions

4
.gitignore vendored
View File

@ -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

View File

@ -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)

View File

@ -22,6 +22,7 @@
#include <winpr/winpr.h>
#include <winpr/tchar.h>
#include <winpr/error.h>
#include <winpr/wtypes.h>
//#define HAVE_PATHCCH_H 1

View File

@ -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;

View File

@ -23,6 +23,8 @@
#include <winpr/crt.h>
#include <winpr/heap.h>
/* Memory Allocation: http://msdn.microsoft.com/en-us/library/hk1k7x6x.aspx */
/* Memory Management Functions: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366781/ */

View File

@ -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()

View File

@ -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()

View File

@ -21,6 +21,8 @@
#include "config.h"
#endif
#include <winpr/heap.h>
#include <winpr/path.h>
HRESULT PathCchAddBackslashA(PSTR pszPath, size_t cchPath)

View File

@ -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;
}