[freerdp] use FREERDP_/UWAC_/RDTK_ prefix for conditional headers
This commit is contained in:
parent
92d3e3c64a
commit
82ba9ede9c
@ -550,9 +550,9 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
if(WITH_VALGRIND_MEMCHECK)
|
||||
check_include_files(valgrind/memcheck.h HAVE_VALGRIND_MEMCHECK_H)
|
||||
check_include_files(valgrind/memcheck.h FREERDP_HAVE_VALGRIND_MEMCHECK_H)
|
||||
else()
|
||||
unset(HAVE_VALGRIND_MEMCHECK_H CACHE)
|
||||
unset(FREERDP_HAVE_VALGRIND_MEMCHECK_H CACHE)
|
||||
endif()
|
||||
|
||||
if(UNIX OR CYGWIN)
|
||||
@ -698,9 +698,9 @@ if(UNIX AND NOT ANDROID)
|
||||
find_feature(libsystemd ${WLOG_SYSTEMD_JOURNAL_FEATURE_TYPE} ${WLOG_SYSTEMD_JOURNAL_FEATURE_PURPOSE} ${WLOG_SYSTEMD_JOURNAL_FEATURE_DESCRIPTION})
|
||||
|
||||
if(LIBSYSTEMD_FOUND)
|
||||
set(HAVE_JOURNALD_H TRUE)
|
||||
set(WINPR_HAVE_JOURNALD_H TRUE)
|
||||
else()
|
||||
unset(HAVE_JOURNALD_H)
|
||||
unset(WINPR_HAVE_JOURNALD_H)
|
||||
endif()
|
||||
endif(UNIX AND NOT ANDROID)
|
||||
|
||||
@ -969,7 +969,7 @@ endif()
|
||||
set(FREERDP_BUILD_CONFIG_LIST "")
|
||||
GET_CMAKE_PROPERTY(res VARIABLES)
|
||||
FOREACH(var ${res})
|
||||
IF (var MATCHES "^WITH_*|^BUILD_TESTING|^HAVE_*")
|
||||
IF (var MATCHES "^WITH_*|^BUILD_TESTING|^WINPR_HAVE_*")
|
||||
LIST(APPEND FREERDP_BUILD_CONFIG_LIST "${var}=${${var}}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
@ -26,10 +26,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -60,10 +60,6 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "rdpdr_capabilities.h"
|
||||
|
||||
#include "devman.h"
|
||||
|
@ -27,10 +27,6 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
@ -19,10 +19,6 @@
|
||||
|
||||
#define TAG CLIENT_TAG("android")
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "android_freerdp.h"
|
||||
#include "android_cliprdr.h"
|
||||
|
||||
|
@ -46,10 +46,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/path.h>
|
||||
|
@ -4,9 +4,7 @@
|
||||
#include <winpr/config.h>
|
||||
|
||||
/* Include files */
|
||||
#cmakedefine HAVE_SYSLOG_H
|
||||
#cmakedefine HAVE_JOURNALD_H
|
||||
#cmakedefine HAVE_VALGRIND_MEMCHECK_H
|
||||
#cmakedefine FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
|
||||
/* Features */
|
||||
#cmakedefine SWRESAMPLE_FOUND
|
||||
|
@ -31,7 +31,7 @@
|
||||
/* websocket need sha1 for Sec-Websocket-Accept */
|
||||
#include <winpr/crypto.h>
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#ifdef FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
@ -853,7 +853,7 @@ HttpResponse* http_response_recv(rdpTls* tls, BOOL readContentLength)
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#ifdef FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
VALGRIND_MAKE_MEM_DEFINED(Stream_Pointer(response->data), status);
|
||||
#endif
|
||||
Stream_Seek(response->data, (size_t)status);
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#ifdef FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
|
@ -22,10 +22,6 @@
|
||||
#include "certificate.h"
|
||||
#include "capabilities.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#ifdef HAVE_POLL_H
|
||||
#ifdef WINPR_HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
@ -227,7 +227,7 @@ static long transport_bio_simple_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
||||
{
|
||||
int timeout = (int)arg1;
|
||||
int sockfd = (int)ptr->socket;
|
||||
#ifdef HAVE_POLL_H
|
||||
#ifdef WINPR_HAVE_POLL_H
|
||||
struct pollfd pollset;
|
||||
pollset.fd = sockfd;
|
||||
pollset.events = POLLIN;
|
||||
@ -262,7 +262,7 @@ static long transport_bio_simple_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
||||
{
|
||||
int timeout = (int)arg1;
|
||||
int sockfd = (int)ptr->socket;
|
||||
#ifdef HAVE_POLL_H
|
||||
#ifdef WINPR_HAVE_POLL_H
|
||||
struct pollfd pollset;
|
||||
pollset.fd = sockfd;
|
||||
pollset.events = POLLOUT;
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <sys/socket.h>
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#ifdef FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
@ -635,7 +635,7 @@ static SSIZE_T transport_read_layer(rdpTransport* transport, BYTE* data, size_t
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#ifdef FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
VALGRIND_MAKE_MEM_DEFINED(data + read, bytes - read);
|
||||
#endif
|
||||
read += status;
|
||||
|
@ -36,11 +36,11 @@
|
||||
#include "../core/tcp.h"
|
||||
#include "opensslcompat.h"
|
||||
|
||||
#ifdef HAVE_POLL_H
|
||||
#ifdef WINPR_HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#ifdef FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
@ -195,7 +195,7 @@ static int bio_rdp_tls_read(BIO* bio, char* buf, int size)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#ifdef FREERDP_HAVE_VALGRIND_MEMCHECK_H
|
||||
|
||||
if (status > 0)
|
||||
{
|
||||
|
@ -26,10 +26,6 @@
|
||||
#include <winpr/platform.h>
|
||||
#include <winpr/crypto.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
primitives_t* generic = NULL;
|
||||
primitives_t* optimized = NULL;
|
||||
BOOL g_TestPrimitivesPerformance = FALSE;
|
||||
|
@ -82,12 +82,10 @@ include (SetFreeRDPCMakeInstallDir)
|
||||
add_definitions(-DRDTK_EXPORTS)
|
||||
|
||||
if (NOT IOS)
|
||||
check_include_files(stdbool.h HAVE_STDBOOL_H)
|
||||
if (NOT HAVE_STDBOOL_H)
|
||||
check_include_files(stdbool.h RDTK_HAVE_STDBOOL_H)
|
||||
if (NOT RDTK_HAVE_STDBOOL_H)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../compat/stdbool)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_STDBOOL_H 1)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
@ -18,7 +18,7 @@ write_basic_package_version_file(
|
||||
set(RDTK_BUILD_CONFIG_LIST "")
|
||||
GET_CMAKE_PROPERTY(res VARIABLES)
|
||||
FOREACH(var ${res})
|
||||
IF (var MATCHES "^WITH_*|^BUILD_TESTING|^HAVE_*")
|
||||
IF (var MATCHES "^WITH_*|^BUILD_TESTING|^RDTK_HAVE_*")
|
||||
LIST(APPEND RDTK_BUILD_CONFIG_LIST "${var}=${${var}}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
@ -52,7 +52,7 @@ if (NOT FREERDP_UNIFIED_BUILD)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(HAVE_PIXMAN_REGION "Use PIXMAN or FreeRDP for region calculations" "NOT FREERDP_UNIFIED_BUILD")
|
||||
option(UWAC_HAVE_PIXMAN_REGION "Use PIXMAN or FreeRDP for region calculations" "NOT FREERDP_UNIFIED_BUILD")
|
||||
|
||||
# Include our extra modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/)
|
||||
@ -69,16 +69,14 @@ endif()
|
||||
|
||||
if (NOT IOS)
|
||||
include(CheckIncludeFiles)
|
||||
check_include_files(stdbool.h WINPR_HAVE_STDBOOL_H)
|
||||
if (NOT WINPR_HAVE_STDBOOL_H)
|
||||
check_include_files(stdbool.h UWAC_HAVE_STDBOOL_H)
|
||||
if (NOT UWAC_HAVE_STDBOOL_H)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../compat/stdbool)
|
||||
endif()
|
||||
else()
|
||||
set(WINPR_HAVE_STDBOOL_H 1)
|
||||
endif()
|
||||
|
||||
# Find required libraries
|
||||
if (HAVE_PIXMAN_REGION)
|
||||
if (UWAC_HAVE_PIXMAN_REGION)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(pixman REQUIRED pixman-1)
|
||||
include_directories(${pixman_INCLUDE_DIRS})
|
||||
|
@ -78,7 +78,7 @@ if (WITH_LIBRARY_VERSIONING)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} PRIVATE ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} ${EPOLLSHIM_LIBS})
|
||||
if (HAVE_PIXMAN_REGION)
|
||||
if (UWAC_HAVE_PIXMAN_REGION)
|
||||
target_link_libraries(${MODULE_NAME} PRIVATE ${pixman_LINK_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(${MODULE_NAME} PRIVATE freerdp)
|
||||
|
@ -184,7 +184,7 @@ static int create_tmpfile_cloexec(char* tmpname)
|
||||
int fd;
|
||||
#ifdef USE_SHM
|
||||
fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
|
||||
#elif defined(HAVE_MKOSTEMP)
|
||||
#elif defined(UWAC_HAVE_MKOSTEMP)
|
||||
fd = mkostemp(tmpname, O_CLOEXEC);
|
||||
|
||||
if (fd >= 0)
|
||||
@ -267,7 +267,7 @@ int uwac_create_anonymous_file(off_t size)
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
|
||||
#ifdef HAVE_POSIX_FALLOCATE
|
||||
#ifdef UWAC_HAVE_POSIX_FALLOCATE
|
||||
ret = posix_fallocate(fd, 0, size);
|
||||
|
||||
if (ret != 0)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "fullscreen-shell-unstable-v1-client-protocol.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PIXMAN_REGION
|
||||
#ifdef UWAC_HAVE_PIXMAN_REGION
|
||||
#include <pixman-1/pixman.h>
|
||||
#else
|
||||
#include <freerdp/codec/region.h>
|
||||
@ -218,7 +218,7 @@ struct uwac_buffer
|
||||
{
|
||||
bool used;
|
||||
bool dirty;
|
||||
#ifdef HAVE_PIXMAN_REGION
|
||||
#ifdef UWAC_HAVE_PIXMAN_REGION
|
||||
pixman_region32_t damage;
|
||||
#else
|
||||
REGION16 damage;
|
||||
|
@ -63,7 +63,7 @@ static void UwacWindowDestroyBuffers(UwacWindow* w)
|
||||
for (i = 0; i < w->nbuffers; i++)
|
||||
{
|
||||
UwacBuffer* buffer = &w->buffers[i];
|
||||
#ifdef HAVE_PIXMAN_REGION
|
||||
#ifdef UWAC_HAVE_PIXMAN_REGION
|
||||
pixman_region32_fini(&buffer->damage);
|
||||
#else
|
||||
region16_uninit(&buffer->damage);
|
||||
@ -351,7 +351,7 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int nbuffers, int allocSize, uint32
|
||||
{
|
||||
int bufferIdx = w->nbuffers + i;
|
||||
UwacBuffer* buffer = &w->buffers[bufferIdx];
|
||||
#ifdef HAVE_PIXMAN_REGION
|
||||
#ifdef UWAC_HAVE_PIXMAN_REGION
|
||||
pixman_region32_init(&buffer->damage);
|
||||
#else
|
||||
region16_init(&buffer->damage);
|
||||
@ -654,7 +654,7 @@ static void frame_done_cb(void* data, struct wl_callback* callback, uint32_t tim
|
||||
|
||||
static const struct wl_callback_listener frame_listener = { frame_done_cb };
|
||||
|
||||
#ifdef HAVE_PIXMAN_REGION
|
||||
#ifdef UWAC_HAVE_PIXMAN_REGION
|
||||
static void damage_surface(UwacWindow* window, UwacBuffer* buffer)
|
||||
{
|
||||
int nrects, i;
|
||||
@ -705,7 +705,7 @@ static void frame_done_cb(void* data, struct wl_callback* callback, uint32_t tim
|
||||
event->window = window;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PIXMAN_REGION
|
||||
#ifdef UWAC_HAVE_PIXMAN_REGION
|
||||
UwacReturnCode UwacWindowAddDamage(UwacWindow* window, uint32_t x, uint32_t y, uint32_t width,
|
||||
uint32_t height)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ install(EXPORT uwac DESTINATION ${UWAC_CMAKE_INSTALL_DIR})
|
||||
set(UWAC_BUILD_CONFIG_LIST "")
|
||||
GET_CMAKE_PROPERTY(res VARIABLES)
|
||||
FOREACH(var ${res})
|
||||
IF (var MATCHES "^WITH_*|^BUILD_TESTING|^HAVE_*")
|
||||
IF (var MATCHES "^WITH_*|^BUILD_TESTING|^UWAC_HAVE_*")
|
||||
LIST(APPEND UWAC_BUILD_CONFIG_LIST "${var}=${${var}}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define UWAC_CONFIG_H
|
||||
|
||||
/* Include files */
|
||||
#cmakedefine HAVE_TM_GMTOFF
|
||||
#cmakedefine HAVE_POLL_H
|
||||
#cmakedefine HAVE_SYSLOG_H
|
||||
#cmakedefine HAVE_JOURNALD_H
|
||||
#cmakedefine HAVE_PIXMAN_REGION
|
||||
#cmakedefine UWAC_HAVE_TM_GMTOFF
|
||||
#cmakedefine UWAC_HAVE_POLL_H
|
||||
#cmakedefine UWAC_HAVE_SYSLOG_H
|
||||
#cmakedefine UWAC_HAVE_JOURNALD_H
|
||||
#cmakedefine UWAC_HAVE_PIXMAN_REGION
|
||||
|
||||
#endif /* UWAC_CONFIG_H */
|
||||
|
Loading…
Reference in New Issue
Block a user