From 92d3e3c64a75f75ee429381b1ddbc9205344d9f5 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 10 Jan 2023 14:30:23 +0100 Subject: [PATCH] [winpr] use WINPR_ prefix for conditional includes --- winpr/CMakeLists.txt | 100 +++++++++--------- winpr/include/config/config.h.in | 42 ++++---- winpr/include/config/wtypes.h.in | 24 ++--- winpr/include/winpr/path.h | 4 +- winpr/include/winpr/string.h | 2 +- winpr/libwinpr/crt/string.c | 2 +- winpr/libwinpr/environment/environment.c | 2 +- winpr/libwinpr/file/generic.c | 14 +-- winpr/libwinpr/file/namedPipeClient.c | 2 +- winpr/libwinpr/file/pattern.c | 4 +- winpr/libwinpr/handle/handle.c | 2 +- winpr/libwinpr/io/device.c | 2 +- winpr/libwinpr/io/io.c | 2 +- winpr/libwinpr/memory/memory.c | 2 +- winpr/libwinpr/pipe/pipe.c | 12 +-- winpr/libwinpr/security/security.c | 2 +- winpr/libwinpr/shell/shell.c | 2 +- winpr/libwinpr/sspi/Kerberos/krb5glue_mit.c | 2 +- winpr/libwinpr/sspicli/sspicli.c | 8 +- winpr/libwinpr/synch/critical.c | 2 +- winpr/libwinpr/synch/event.c | 18 ++-- winpr/libwinpr/synch/event.h | 2 +- winpr/libwinpr/synch/pollset.c | 18 ++-- winpr/libwinpr/synch/pollset.h | 4 +- winpr/libwinpr/synch/semaphore.c | 2 +- winpr/libwinpr/synch/sleep.c | 2 +- winpr/libwinpr/synch/synch.h | 2 +- winpr/libwinpr/synch/wait.c | 6 +- winpr/libwinpr/sysinfo/sysinfo.c | 2 +- winpr/libwinpr/thread/argv.c | 2 +- winpr/libwinpr/thread/thread.c | 4 +- winpr/libwinpr/timezone/timezone.c | 2 +- winpr/libwinpr/utils/CMakeLists.txt | 12 +-- .../utils/collections/CountdownEvent.c | 2 +- winpr/libwinpr/utils/collections/Reference.c | 2 +- winpr/libwinpr/utils/debug.c | 18 ++-- winpr/libwinpr/utils/sam.c | 2 +- winpr/libwinpr/utils/wlog/Appender.c | 4 +- winpr/libwinpr/utils/wlog/Appender.h | 4 +- winpr/libwinpr/utils/wlog/wlog.c | 6 +- winpr/libwinpr/winsock/winsock.c | 6 +- 41 files changed, 176 insertions(+), 176 deletions(-) diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 1c55ff8e8..50970b04d 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -79,7 +79,7 @@ if (NOT WIN32 AND NOT ANDROID AND NOT IOS) if(KRB5_FLAVOUR STREQUAL "MIT") add_definitions("-DWITH_KRB5 -DWITH_KRB5_MIT") if(KRB5_VERSION_1_13) - add_definitions("-DHAVE_AT_LEAST_KRB_V1_13") + add_definitions("-DWINPR_HAVE_AT_LEAST_KRB_V1_13") endif() include_directories(${_KRB5_INCLUDE_DIR}) elseif(KRB5_FLAVOUR STREQUAL "Heimdal") @@ -176,36 +176,36 @@ else() endif() if(NOT IOS) - CHECK_SYMBOL_EXISTS(strndup string.h HAVE_STRNDUP) - check_include_files(unistd.h HAVE_UNISTD_H) - check_include_files(execinfo.h HAVE_EXECINFO_HEADER) - if (HAVE_EXECINFO_HEADER) - check_symbol_exists(backtrace execinfo.h HAVE_EXECINFO_BACKTRACE) - check_symbol_exists(backtrace_symbols execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS) - check_symbol_exists(backtrace_symbols_fd execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD) + CHECK_SYMBOL_EXISTS(strndup string.h WINPR_HAVE_STRNDUP) + check_include_files(unistd.h WINPR_HAVE_UNISTD_H) + check_include_files(execinfo.h WINPR_HAVE_EXECINFO_HEADER) + if (WINPR_HAVE_EXECINFO_HEADER) + check_symbol_exists(backtrace execinfo.h WINPR_HAVE_EXECINFO_BACKTRACE) + check_symbol_exists(backtrace_symbols execinfo.h WINPR_HAVE_EXECINFO_BACKTRACE_SYMBOLS) + check_symbol_exists(backtrace_symbols_fd execinfo.h WINPR_HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD) # Some implementations (e.g. Android NDK API < 33) provide execinfo.h but do not define # the backtrace functions. Disable detection for these cases - if (HAVE_EXECINFO_BACKTRACE AND HAVE_EXECINFO_BACKTRACE_SYMBOLS AND HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD) - set(HAVE_EXECINFO_H ON) + if (WINPR_HAVE_EXECINFO_BACKTRACE AND WINPR_HAVE_EXECINFO_BACKTRACE_SYMBOLS AND WINPR_HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD) + set(WINPR_HAVE_EXECINFO_H ON) endif() endif() - check_include_files(inttypes.h HAVE_INTTYPES_H) - check_include_files(stdint.h HAVE_STDINT_H) - check_include_files(inttypes.h HAVE_INTTYPES_H) + check_include_files(inttypes.h WINPR_HAVE_INTTYPES_H) + check_include_files(stdint.h WINPR_HAVE_STDINT_H) + check_include_files(inttypes.h WINPR_HAVE_INTTYPES_H) else(NOT IOS) - set(HAVE_STDINT_H 1) - set(HAVE_STRNDUP 1) - set(HAVE_INTTYPES_H 1) + set(WINPR_HAVE_STDINT_H 1) + set(WINPR_HAVE_STRNDUP 1) + set(WINPR_HAVE_INTTYPES_H 1) endif(NOT IOS) if (NOT IOS) - check_include_files(stdbool.h HAVE_STDBOOL_H) - if (NOT HAVE_STDBOOL_H) + check_include_files(stdbool.h WINPR_HAVE_STDBOOL_H) + if (NOT WINPR_HAVE_STDBOOL_H) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../compat/stdbool) endif() else() - set(HAVE_STDBOOL_H 1) + set(WINPR_HAVE_STDBOOL_H 1) endif() set(CMAKE_THREAD_PREFER_PTHREAD TRUE) @@ -216,31 +216,31 @@ endif() # Include files if(NOT IOS) - check_include_files(fcntl.h HAVE_FCNTL_H) - check_include_files(aio.h HAVE_AIO_H) - check_include_files(sys/timerfd.h HAVE_SYS_TIMERFD_H) - check_include_files(unistd.h HAVE_UNISTD_H) - check_include_files(inttypes.h HAVE_INTTYPES_H) - check_include_files(sys/filio.h HAVE_SYS_FILIO_H) - check_include_files(sys/sockio.h HAVE_SYS_SOCKIO_H) - check_include_files(syslog.h HAVE_SYSLOG_H) - check_include_files(sys/select.h HAVE_SYS_SELECT_H) - check_include_files(sys/eventfd.h HAVE_SYS_EVENTFD_H) - check_include_files(unwind.h HAVE_UNWIND_H) - if (HAVE_SYS_EVENTFD_H) + check_include_files(fcntl.h WINPR_HAVE_FCNTL_H) + check_include_files(aio.h WINPR_HAVE_AIO_H) + check_include_files(sys/timerfd.h WINPR_HAVE_SYS_TIMERFD_H) + check_include_files(unistd.h WINPR_HAVE_UNISTD_H) + check_include_files(inttypes.h WINPR_HAVE_INTTYPES_H) + check_include_files(sys/filio.h WINPR_HAVE_SYS_FILIO_H) + check_include_files(sys/sockio.h WINPR_HAVE_SYS_SOCKIO_H) + check_include_files(syslog.h WINPR_HAVE_SYSLOG_H) + check_include_files(sys/select.h WINPR_HAVE_SYS_SELECT_H) + check_include_files(sys/eventfd.h WINPR_HAVE_SYS_EVENTFD_H) + check_include_files(unwind.h WINPR_HAVE_UNWIND_H) + if (WINPR_HAVE_SYS_EVENTFD_H) check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE) endif() include(CheckFunctionExists) - check_function_exists(getlogin_r HAVE_GETLOGIN_R) - check_function_exists(getpwuid_r HAVE_GETPWUID_R) - check_struct_has_member("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF) + check_function_exists(getlogin_r WINPR_HAVE_GETLOGIN_R) + check_function_exists(getpwuid_r WINPR_HAVE_GETPWUID_R) + check_struct_has_member("struct tm" tm_gmtoff time.h WINPR_HAVE_TM_GMTOFF) else() - set(HAVE_FCNTL_H 1) - set(HAVE_UNISTD_H 1) - set(HAVE_INTTYPES_H 1) - set(HAVE_SYS_FILIO_H 1) - set(HAVE_TM_GMTOFF 1) + set(WINPR_HAVE_FCNTL_H 1) + set(WINPR_HAVE_UNISTD_H 1) + set(WINPR_HAVE_INTTYPES_H 1) + set(WINPR_HAVE_SYS_FILIO_H 1) + set(WINPR_HAVE_TM_GMTOFF 1) endif() if(UNIX OR CYGWIN) @@ -252,25 +252,25 @@ if(UNIX OR CYGWIN) endif() option(WITH_POLL "Check for and include poll.h" ON) if (WITH_POLL) - check_include_files(poll.h HAVE_POLL_H) + check_include_files(poll.h WINPR_HAVE_POLL_H) endif() endif() if(NOT WIN32 AND NOT IOS) - if (NOT HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB) - CHECK_LIBRARY_EXISTS(pthreads pthread_mutex_timedlock "" HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS) - endif (NOT HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB) + if (NOT WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB) + CHECK_LIBRARY_EXISTS(pthreads pthread_mutex_timedlock "" WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS) + endif (NOT WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB) - if (NOT HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL) - CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB) - endif (NOT HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL) + if (NOT WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL) + CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB) + endif (NOT WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL) list(APPEND CMAKE_REQUIRED_LIBRARIES pthread) - CHECK_SYMBOL_EXISTS(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL) + CHECK_SYMBOL_EXISTS(pthread_mutex_timedlock pthread.h WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL) - if (HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL OR HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB OR HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS) - set(HAVE_PTHREAD_MUTEX_TIMEDLOCK ON) - endif (HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL OR HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB OR HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS) + if (WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL OR WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB OR WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS) + set(WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK ON) + endif (WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL OR WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB OR WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS) list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES pthread) endif() diff --git a/winpr/include/config/config.h.in b/winpr/include/config/config.h.in index 108e7fd0c..19d5df681 100644 --- a/winpr/include/config/config.h.in +++ b/winpr/include/config/config.h.in @@ -2,27 +2,27 @@ #define WINPR_CONFIG_H /* Include files */ -#cmakedefine HAVE_FCNTL_H -#cmakedefine HAVE_UNISTD_H -#cmakedefine HAVE_INTTYPES_H -#cmakedefine HAVE_STDBOOL_H -#cmakedefine HAVE_AIO_H -#cmakedefine HAVE_SYS_FILIO_H -#cmakedefine HAVE_SYS_SELECT_H -#cmakedefine HAVE_SYS_SOCKIO_H -#cmakedefine HAVE_SYS_EVENTFD_H -#cmakedefine HAVE_SYS_TIMERFD_H -#cmakedefine HAVE_TM_GMTOFF -#cmakedefine HAVE_AIO_H -#cmakedefine HAVE_POLL_H -#cmakedefine HAVE_SYSLOG_H -#cmakedefine HAVE_JOURNALD_H -#cmakedefine HAVE_PTHREAD_MUTEX_TIMEDLOCK -#cmakedefine HAVE_EXECINFO_H -#cmakedefine HAVE_GETLOGIN_R -#cmakedefine HAVE_GETPWUID_R -#cmakedefine HAVE_STRNDUP -#cmakedefine HAVE_UNWIND_H +#cmakedefine WINPR_HAVE_FCNTL_H +#cmakedefine WINPR_HAVE_UNISTD_H +#cmakedefine WINPR_HAVE_INTTYPES_H +#cmakedefine WINPR_HAVE_STDBOOL_H +#cmakedefine WINPR_HAVE_AIO_H +#cmakedefine WINPR_HAVE_SYS_FILIO_H +#cmakedefine WINPR_HAVE_SYS_SELECT_H +#cmakedefine WINPR_HAVE_SYS_SOCKIO_H +#cmakedefine WINPR_HAVE_SYS_EVENTFD_H +#cmakedefine WINPR_HAVE_SYS_TIMERFD_H +#cmakedefine WINPR_HAVE_TM_GMTOFF +#cmakedefine WINPR_HAVE_AIO_H +#cmakedefine WINPR_HAVE_POLL_H +#cmakedefine WINPR_HAVE_SYSLOG_H +#cmakedefine WINPR_HAVE_JOURNALD_H +#cmakedefine WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK +#cmakedefine WINPR_HAVE_EXECINFO_H +#cmakedefine WINPR_HAVE_GETLOGIN_R +#cmakedefine WINPR_HAVE_GETPWUID_R +#cmakedefine WINPR_HAVE_STRNDUP +#cmakedefine WINPR_HAVE_UNWIND_H #cmakedefine WITH_EVENTFD_READ_WRITE diff --git a/winpr/include/config/wtypes.h.in b/winpr/include/config/wtypes.h.in index 71b58d5e5..23cebd6a6 100644 --- a/winpr/include/config/wtypes.h.in +++ b/winpr/include/config/wtypes.h.in @@ -21,12 +21,12 @@ #define WINPR_WTYPES_H /* Set by CMake during configuration */ -#cmakedefine HAVE_STDINT_H -#cmakedefine HAVE_STDBOOL_H +#cmakedefine WINPR_HAVE_STDINT_H +#cmakedefine WINPR_HAVE_STDBOOL_H #if !defined(_MSC_VER) || _MSC_VER >= 1900 /* Microsoft's inttypes.h is broken before MSVC 2015 */ -#cmakedefine HAVE_INTTYPES_H +#cmakedefine WINPR_HAVE_INTTYPES_H #endif /* MSDN: Windows Data Types - http://msdn.microsoft.com/en-us/library/aa383751/ */ @@ -37,15 +37,15 @@ #include -#ifdef HAVE_STDBOOL_H +#ifdef WINPR_HAVE_STDBOOL_H #include #endif -#ifdef HAVE_STDINT_H +#ifdef WINPR_HAVE_STDINT_H #include #endif -#ifdef HAVE_INTTYPES_H +#ifdef WINPR_HAVE_INTTYPES_H #include #endif @@ -96,7 +96,7 @@ typedef LONG_PTR SSIZE_T; #define NEAR #endif -#ifdef HAVE_STDINT_H +#ifdef WINPR_HAVE_STDINT_H typedef int8_t __int8; typedef uint8_t __uint8; typedef int16_t __int16; @@ -138,9 +138,9 @@ typedef unsigned long long __uint64; #else #error "64-bit type not configured" #endif -#endif /* HAVE_STDINT_H */ +#endif /* WINPR_HAVE_STDINT_H */ -#ifdef HAVE_STDINT_H +#ifdef WINPR_HAVE_STDINT_H #if defined(__ILP64__) || defined(__LP64__) #define __int3264 int64_t #define __uint3264 uint64_t @@ -156,7 +156,7 @@ typedef unsigned long long __uint64; #define __int3264 __int32 #define __uint3264 __uint32 #endif -#endif /* HAVE_STDINT_H */ +#endif /* WINPR_HAVE_STDINT_H */ typedef void* PVOID, *LPVOID, *PVOID64, *LPVOID64; @@ -486,7 +486,7 @@ typedef const BYTE* LPCBYTE; #endif /* integer format specifiers */ -#ifndef HAVE_INTTYPES_H +#ifndef WINPR_HAVE_INTTYPES_H #define PRId8 "hhd" #define PRIi8 "hhi" #define PRIu8 "hhu" @@ -535,7 +535,7 @@ typedef const BYTE* LPCBYTE; #define PRIX64 "llX" #endif #endif /* _MSC_VER */ -#endif /* HAVE_INTTYPES_H not defined*/ +#endif /* WINPR_HAVE_INTTYPES_H not defined*/ #ifndef SSIZE_MAX #if defined(_POSIX_SSIZE_MAX) diff --git a/winpr/include/winpr/path.h b/winpr/include/winpr/path.h index e677628b8..97caf3d7f 100644 --- a/winpr/include/winpr/path.h +++ b/winpr/include/winpr/path.h @@ -25,9 +25,9 @@ #include #include -//#define HAVE_PATHCCH_H 1 +//#define WINPR_HAVE_PATHCCH_H 1 -#ifdef HAVE_PATHCCH_H +#ifdef WINPR_HAVE_PATHCCH_H #include diff --git a/winpr/include/winpr/string.h b/winpr/include/winpr/string.h index 922be9c08..c0d39b77c 100644 --- a/winpr/include/winpr/string.h +++ b/winpr/include/winpr/string.h @@ -423,7 +423,7 @@ extern "C" WINPR_API INT64 GetLine(char** lineptr, size_t* size, FILE* stream); -#if !defined(HAVE_STRNDUP) +#if !defined(WINPR_HAVE_STRNDUP) WINPR_API char* strndup(const char* s, size_t n); #endif diff --git a/winpr/libwinpr/crt/string.c b/winpr/libwinpr/crt/string.c index d2b9a6c7d..f460c3ec9 100644 --- a/winpr/libwinpr/crt/string.c +++ b/winpr/libwinpr/crt/string.c @@ -694,7 +694,7 @@ INT64 GetLine(char** lineptr, size_t* size, FILE* stream) #endif } -#if !defined(HAVE_STRNDUP) +#if !defined(WINPR_HAVE_STRNDUP) char* strndup(const char* src, size_t n) { char* dst = calloc(n + 1, sizeof(char)); diff --git a/winpr/libwinpr/environment/environment.c b/winpr/libwinpr/environment/environment.c index 3186dc639..9b570802c 100644 --- a/winpr/libwinpr/environment/environment.c +++ b/winpr/libwinpr/environment/environment.c @@ -33,7 +33,7 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/file/generic.c b/winpr/libwinpr/file/generic.c index 400803bcd..4811eabf3 100644 --- a/winpr/libwinpr/file/generic.c +++ b/winpr/libwinpr/file/generic.c @@ -26,11 +26,11 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif -#ifdef HAVE_FCNTL_H +#ifdef WINPR_HAVE_FCNTL_H #include #endif @@ -51,11 +51,11 @@ #include #include -#ifdef HAVE_AIO_H -#undef HAVE_AIO_H /* disable for now, incomplete */ +#ifdef WINPR_HAVE_AIO_H +#undef WINPR_HAVE_AIO_H /* disable for now, incomplete */ #endif -#ifdef HAVE_AIO_H +#ifdef WINPR_HAVE_AIO_H #include #endif @@ -202,7 +202,7 @@ static void _HandleCreatorsInit() ArrayList_Append(_HandleCreators, GetFileHandleCreator()); } -#ifdef HAVE_AIO_H +#ifdef WINPR_HAVE_AIO_H static BOOL g_AioSignalHandlerInstalled = FALSE; @@ -227,7 +227,7 @@ int InstallAioSignalHandler() return 0; } -#endif /* HAVE_AIO_H */ +#endif /* WINPR_HAVE_AIO_H */ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, diff --git a/winpr/libwinpr/file/namedPipeClient.c b/winpr/libwinpr/file/namedPipeClient.c index 7593d6287..17166f800 100644 --- a/winpr/libwinpr/file/namedPipeClient.c +++ b/winpr/libwinpr/file/namedPipeClient.c @@ -25,7 +25,7 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/file/pattern.c b/winpr/libwinpr/file/pattern.c index 6ba08129c..2fde802a0 100644 --- a/winpr/libwinpr/file/pattern.c +++ b/winpr/libwinpr/file/pattern.c @@ -24,11 +24,11 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif -#ifdef HAVE_FCNTL_H +#ifdef WINPR_HAVE_FCNTL_H #include #endif diff --git a/winpr/libwinpr/handle/handle.c b/winpr/libwinpr/handle/handle.c index cd5049e94..996ac948c 100644 --- a/winpr/libwinpr/handle/handle.c +++ b/winpr/libwinpr/handle/handle.c @@ -32,7 +32,7 @@ #include "../comm/comm.h" #include "../security/security.h" -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/io/device.c b/winpr/libwinpr/io/device.c index c8f75e5ce..1fa760350 100644 --- a/winpr/libwinpr/io/device.c +++ b/winpr/libwinpr/io/device.c @@ -30,7 +30,7 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/io/io.c b/winpr/libwinpr/io/io.c index dbd5e3437..00b80bee5 100644 --- a/winpr/libwinpr/io/io.c +++ b/winpr/libwinpr/io/io.c @@ -23,7 +23,7 @@ #ifndef _WIN32 -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/memory/memory.c b/winpr/libwinpr/memory/memory.c index 2ef1296c0..83f4c0782 100644 --- a/winpr/libwinpr/memory/memory.c +++ b/winpr/libwinpr/memory/memory.c @@ -23,7 +23,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/pipe/pipe.c b/winpr/libwinpr/pipe/pipe.c index faf8acbae..f3a9bcc05 100644 --- a/winpr/libwinpr/pipe/pipe.c +++ b/winpr/libwinpr/pipe/pipe.c @@ -28,7 +28,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif @@ -43,11 +43,11 @@ #include #include -#ifdef HAVE_SYS_AIO_H -#undef HAVE_SYS_AIO_H /* disable for now, incomplete */ +#ifdef WINPR_HAVE_SYS_AIO_H +#undef WINPR_HAVE_SYS_AIO_H /* disable for now, incomplete */ #endif -#ifdef HAVE_SYS_AIO_H +#ifdef WINPR_HAVE_SYS_AIO_H #include #endif @@ -306,7 +306,7 @@ BOOL NamedPipeRead(PVOID Object, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, return FALSE; pipe->lpOverlapped = lpOverlapped; -#ifdef HAVE_SYS_AIO_H +#ifdef WINPR_HAVE_SYS_AIO_H { int aio_status; struct aiocb cb = { 0 }; @@ -394,7 +394,7 @@ BOOL NamedPipeWrite(PVOID Object, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, return FALSE; pipe->lpOverlapped = lpOverlapped; -#ifdef HAVE_SYS_AIO_H +#ifdef WINPR_HAVE_SYS_AIO_H { struct aiocb cb = { 0 }; diff --git a/winpr/libwinpr/security/security.c b/winpr/libwinpr/security/security.c index 24024e43c..3806233b2 100644 --- a/winpr/libwinpr/security/security.c +++ b/winpr/libwinpr/security/security.c @@ -21,7 +21,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/shell/shell.c b/winpr/libwinpr/shell/shell.c index 112e31793..deac59135 100644 --- a/winpr/libwinpr/shell/shell.c +++ b/winpr/libwinpr/shell/shell.c @@ -32,7 +32,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/sspi/Kerberos/krb5glue_mit.c b/winpr/libwinpr/sspi/Kerberos/krb5glue_mit.c index d73f32eef..6d166a13d 100644 --- a/winpr/libwinpr/sspi/Kerberos/krb5glue_mit.c +++ b/winpr/libwinpr/sspi/Kerberos/krb5glue_mit.c @@ -198,7 +198,7 @@ krb5_error_code krb5glue_get_init_creds(krb5_context ctx, krb5_principal princ, cleanup: krb5_init_creds_free(ctx, creds_ctx); -#ifdef HAVE_AT_LEAST_KRB_V1_13 +#ifdef WINPR_HAVE_AT_LEAST_KRB_V1_13 krb5_get_init_creds_opt_free(ctx, gic_opt); #endif winpr_DeleteFile(tmp_profile_path); diff --git a/winpr/libwinpr/sspicli/sspicli.c b/winpr/libwinpr/sspicli/sspicli.c index 12b54568d..38a8d1d9a 100644 --- a/winpr/libwinpr/sspicli/sspicli.c +++ b/winpr/libwinpr/sspicli/sspicli.c @@ -55,11 +55,11 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif -#if defined(HAVE_GETPWUID_R) +#if defined(WINPR_HAVE_GETPWUID_R) #include #include #include @@ -204,7 +204,7 @@ BOOL GetUserNameExA(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG switch (NameFormat) { case NameSamCompatible: -#if defined(HAVE_GETPWUID_R) +#if defined(WINPR_HAVE_GETPWUID_R) { int rc; struct passwd pwd = { 0 }; @@ -217,7 +217,7 @@ BOOL GetUserNameExA(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG if (result == NULL) return FALSE; } -#elif defined(HAVE_GETLOGIN_R) +#elif defined(WINPR_HAVE_GETLOGIN_R) if (getlogin_r(lpNameBuffer, *nSize) != 0) return FALSE; #else diff --git a/winpr/libwinpr/synch/critical.c b/winpr/libwinpr/synch/critical.c index 753238aea..0b674ae2b 100644 --- a/winpr/libwinpr/synch/critical.c +++ b/winpr/libwinpr/synch/critical.c @@ -28,7 +28,7 @@ #include "synch.h" -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/synch/event.c b/winpr/libwinpr/synch/event.c index 41322d917..69f3a5d38 100644 --- a/winpr/libwinpr/synch/event.c +++ b/winpr/libwinpr/synch/event.c @@ -31,11 +31,11 @@ #include "synch.h" -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif -#ifdef HAVE_SYS_EVENTFD_H +#ifdef WINPR_HAVE_SYS_EVENTFD_H #include #endif @@ -77,7 +77,7 @@ static void dump_event(WINPR_EVENT* event, size_t index) } #endif /* WITH_DEBUG_EVENTS */ -#ifdef HAVE_SYS_EVENTFD_H +#ifdef WINPR_HAVE_SYS_EVENTFD_H #if !defined(WITH_EVENTFD_READ_WRITE) static int eventfd_read(int fd, eventfd_t* value) { @@ -91,7 +91,7 @@ static int eventfd_write(int fd, eventfd_t value) #endif #endif -#ifndef HAVE_SYS_EVENTFD_H +#ifndef WINPR_HAVE_SYS_EVENTFD_H static BOOL set_non_blocking_fd(int fd) { int flags; @@ -101,11 +101,11 @@ static BOOL set_non_blocking_fd(int fd) return fcntl(fd, F_SETFL, flags | O_NONBLOCK) >= 0; } -#endif /* !HAVE_SYS_EVENTFD_H */ +#endif /* !WINPR_HAVE_SYS_EVENTFD_H */ BOOL winpr_event_init(WINPR_EVENT_IMPL* event) { -#ifdef HAVE_SYS_EVENTFD_H +#ifdef WINPR_HAVE_SYS_EVENTFD_H event->fds[1] = -1; event->fds[0] = eventfd(0, EFD_NONBLOCK); @@ -130,7 +130,7 @@ out_error: void winpr_event_init_from_fd(WINPR_EVENT_IMPL* event, int fd) { event->fds[0] = fd; -#ifndef HAVE_SYS_EVENTFD_H +#ifndef WINPR_HAVE_SYS_EVENTFD_H event->fds[1] = fd; #endif } @@ -140,7 +140,7 @@ BOOL winpr_event_set(WINPR_EVENT_IMPL* event) int ret; do { -#ifdef HAVE_SYS_EVENTFD_H +#ifdef WINPR_HAVE_SYS_EVENTFD_H eventfd_t value = 1; ret = eventfd_write(event->fds[0], value); #else @@ -158,7 +158,7 @@ BOOL winpr_event_reset(WINPR_EVENT_IMPL* event) { do { -#ifdef HAVE_SYS_EVENTFD_H +#ifdef WINPR_HAVE_SYS_EVENTFD_H eventfd_t value = 1; ret = eventfd_read(event->fds[0], &value); #else diff --git a/winpr/libwinpr/synch/event.h b/winpr/libwinpr/synch/event.h index 21a5eaebd..0f57374a7 100644 --- a/winpr/libwinpr/synch/event.h +++ b/winpr/libwinpr/synch/event.h @@ -23,7 +23,7 @@ #include -#ifdef HAVE_SYS_EVENTFD_H +#ifdef WINPR_HAVE_SYS_EVENTFD_H #include #endif diff --git a/winpr/libwinpr/synch/pollset.c b/winpr/libwinpr/synch/pollset.c index e8e5b4e6f..5a91634ae 100644 --- a/winpr/libwinpr/synch/pollset.c +++ b/winpr/libwinpr/synch/pollset.c @@ -9,7 +9,7 @@ #define TAG WINPR_TAG("sync.pollset") -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H static INT16 handle_mode_to_pollevent(ULONG mode) { INT16 event = 0; @@ -27,7 +27,7 @@ static INT16 handle_mode_to_pollevent(ULONG mode) BOOL pollset_init(WINPR_POLL_SET* set, size_t nhandles) { WINPR_ASSERT(set); -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H if (nhandles > MAXIMUM_WAIT_OBJECTS) { set->isStatic = FALSE; @@ -61,7 +61,7 @@ BOOL pollset_init(WINPR_POLL_SET* set, size_t nhandles) void pollset_uninit(WINPR_POLL_SET* set) { WINPR_ASSERT(set); -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H if (!set->isStatic) free(set->pollset); #else @@ -72,7 +72,7 @@ void pollset_uninit(WINPR_POLL_SET* set) void pollset_reset(WINPR_POLL_SET* set) { WINPR_ASSERT(set); -#ifndef HAVE_POLL_H +#ifndef WINPR_HAVE_POLL_H FD_ZERO(&set->rset_base); FD_ZERO(&set->wset_base); set->maxFd = 0; @@ -84,7 +84,7 @@ void pollset_reset(WINPR_POLL_SET* set) BOOL pollset_add(WINPR_POLL_SET* set, int fd, ULONG mode) { WINPR_ASSERT(set); -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H struct pollfd* item; if (set->fillIndex == set->size) return FALSE; @@ -129,7 +129,7 @@ int pollset_poll(WINPR_POLL_SET* set, DWORD dwMilliseconds) else dueTime = now + dwMilliseconds; -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H int timeout; do @@ -212,7 +212,7 @@ BOOL pollset_isSignaled(WINPR_POLL_SET* set, size_t idx) return FALSE; } -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H return !!(set->pollset[idx].revents & set->pollset[idx].events); #else FdIndex* fdIndex = &set->fdIndex[idx]; @@ -240,7 +240,7 @@ BOOL pollset_isReadSignaled(WINPR_POLL_SET* set, size_t idx) return FALSE; } -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H return !!(set->pollset[idx].revents & POLLIN); #else FdIndex* fdIndex = &set->fdIndex[idx]; @@ -262,7 +262,7 @@ BOOL pollset_isWriteSignaled(WINPR_POLL_SET* set, size_t idx) return FALSE; } -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H return !!(set->pollset[idx].revents & POLLOUT); #else FdIndex* fdIndex = &set->fdIndex[idx]; diff --git a/winpr/libwinpr/synch/pollset.h b/winpr/libwinpr/synch/pollset.h index 9017f4714..6e478e6c7 100644 --- a/winpr/libwinpr/synch/pollset.h +++ b/winpr/libwinpr/synch/pollset.h @@ -26,7 +26,7 @@ #ifndef _WIN32 -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H #include #else #include @@ -40,7 +40,7 @@ typedef struct struct winpr_poll_set { -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H struct pollfd* pollset; struct pollfd staticSet[MAXIMUM_WAIT_OBJECTS]; BOOL isStatic; diff --git a/winpr/libwinpr/synch/semaphore.c b/winpr/libwinpr/synch/semaphore.c index 91e822283..5c1c26648 100644 --- a/winpr/libwinpr/synch/semaphore.c +++ b/winpr/libwinpr/synch/semaphore.c @@ -23,7 +23,7 @@ #include "synch.h" -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/synch/sleep.c b/winpr/libwinpr/synch/sleep.c index 6ef483802..95e9eed51 100644 --- a/winpr/libwinpr/synch/sleep.c +++ b/winpr/libwinpr/synch/sleep.c @@ -39,7 +39,7 @@ #pragma clang diagnostic ignored "-Wreserved-id-macro" #endif -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE 500 #endif diff --git a/winpr/libwinpr/synch/synch.h b/winpr/libwinpr/synch/synch.h index e8c06140a..5fb1558ef 100644 --- a/winpr/libwinpr/synch/synch.h +++ b/winpr/libwinpr/synch/synch.h @@ -65,7 +65,7 @@ struct winpr_semaphore }; typedef struct winpr_semaphore WINPR_SEMAPHORE; -#ifdef HAVE_SYS_TIMERFD_H +#ifdef WINPR_HAVE_SYS_TIMERFD_H #include #include #include diff --git a/winpr/libwinpr/synch/wait.c b/winpr/libwinpr/synch/wait.c index fe1188acd..8c442a50d 100644 --- a/winpr/libwinpr/synch/wait.c +++ b/winpr/libwinpr/synch/wait.c @@ -20,7 +20,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif @@ -118,7 +118,7 @@ int _mach_safe_clock_gettime(int clk_id, struct timespec* t) * http://code.google.com/p/android/issues/detail?id=7807 * http://aleksmaus.blogspot.ca/2011/12/missing-pthreadmutextimedlock-on.html */ -#if !defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) +#if !defined(WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK) #include static long long ts_difftime(const struct timespec* o, const struct timespec* n) @@ -458,7 +458,7 @@ DWORD WaitForMultipleObjectsEx(DWORD nCount, const HANDLE* lpHandles, BOOL bWait status = pollset_poll(&pollset, waitTime); if (status < 0) { -#ifdef HAVE_POLL_H +#ifdef WINPR_HAVE_POLL_H WLog_ERR(TAG, "poll() handle %" PRIu32 " (%" PRIu32 ") failure [%d] %s", index, nCount, errno, strerror(errno)); #else diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c index c674dd1ec..bf36cca86 100644 --- a/winpr/libwinpr/sysinfo/sysinfo.c +++ b/winpr/libwinpr/sysinfo/sysinfo.c @@ -61,7 +61,7 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/thread/argv.c b/winpr/libwinpr/thread/argv.c index c57debb14..c00d16a99 100644 --- a/winpr/libwinpr/thread/argv.c +++ b/winpr/libwinpr/thread/argv.c @@ -24,7 +24,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/thread/thread.c b/winpr/libwinpr/thread/thread.c index df923a864..c0b362b9a 100644 --- a/winpr/libwinpr/thread/thread.c +++ b/winpr/libwinpr/thread/thread.c @@ -73,11 +73,11 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif -#ifdef HAVE_SYS_EVENTFD_H +#ifdef WINPR_HAVE_SYS_EVENTFD_H #include #endif diff --git a/winpr/libwinpr/timezone/timezone.c b/winpr/libwinpr/timezone/timezone.c index d130d739f..b1006a4cd 100644 --- a/winpr/libwinpr/timezone/timezone.c +++ b/winpr/libwinpr/timezone/timezone.c @@ -401,7 +401,7 @@ DWORD GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation) goto out_error; memset(tz, 0, sizeof(TIME_ZONE_INFORMATION)); -#ifdef HAVE_TM_GMTOFF +#ifdef WINPR_HAVE_TM_GMTOFF { long bias = -(local_time->tm_gmtoff / 60L); diff --git a/winpr/libwinpr/utils/CMakeLists.txt b/winpr/libwinpr/utils/CMakeLists.txt index 1a751a29c..8716d8e40 100644 --- a/winpr/libwinpr/utils/CMakeLists.txt +++ b/winpr/libwinpr/utils/CMakeLists.txt @@ -40,7 +40,7 @@ set(LODEPNG_SRCS lodepng/lodepng.c lodepng/lodepng.h) -if (HAVE_SYSLOG_H) +if (WINPR_HAVE_SYSLOG_H) set(SYSLOG_SRCS wlog/SyslogAppender.c wlog/SyslogAppender.h @@ -107,13 +107,13 @@ set(SRCS if (ANDROID) list(APPEND SRCS android.h android.c) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - if (NOT HAVE_UNWIND_H) + if (NOT WINPR_HAVE_UNWIND_H) message("[backtrace] android NDK without unwind.h, falling back to corkscrew") - set(HAVE_CORKSCREW 1) + set(WINPR_HAVE_CORKSCREW 1) endif() endif() -if (HAVE_CORKSCREW) +if (WINPR_HAVE_CORKSCREW) list(APPEND SRCS corkscrew/debug.c corkscrew/debug.h) @@ -125,13 +125,13 @@ if (WIN32) windows/debug.h) endif() -if (HAVE_EXECINFO_H) +if (WINPR_HAVE_EXECINFO_H) list(APPEND SRCS execinfo/debug.c execinfo/debug.h) endif() -if (HAVE_UNWIND_H) +if (WINPR_HAVE_UNWIND_H) option(USE_UNWIND "Use unwind.h to generate backtraces" ON) if (USE_UNWIND) add_definitions(-DUSE_UNWIND) diff --git a/winpr/libwinpr/utils/collections/CountdownEvent.c b/winpr/libwinpr/utils/collections/CountdownEvent.c index e119f87f8..489649aee 100644 --- a/winpr/libwinpr/utils/collections/CountdownEvent.c +++ b/winpr/libwinpr/utils/collections/CountdownEvent.c @@ -19,7 +19,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/utils/collections/Reference.c b/winpr/libwinpr/utils/collections/Reference.c index feae99554..ee92d256c 100644 --- a/winpr/libwinpr/utils/collections/Reference.c +++ b/winpr/libwinpr/utils/collections/Reference.c @@ -19,7 +19,7 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/utils/debug.c b/winpr/libwinpr/utils/debug.c index f763ad664..fd89b8b16 100644 --- a/winpr/libwinpr/utils/debug.c +++ b/winpr/libwinpr/utils/debug.c @@ -26,7 +26,7 @@ #include #include -#if defined(HAVE_EXECINFO_H) +#if defined(WINPR_HAVE_EXECINFO_H) #include #endif @@ -34,7 +34,7 @@ #include #endif -#if defined(HAVE_CORKSCREW) +#if defined(WINPR_HAVE_CORKSCREW) #include #endif @@ -92,9 +92,9 @@ void winpr_backtrace_free(void* buffer) #if defined(USE_UNWIND) winpr_unwind_backtrace_free(buffer); -#elif defined(HAVE_EXECINFO_H) +#elif defined(WINPR_HAVE_EXECINFO_H) winpr_execinfo_backtrace_free(buffer); -#elif defined(HAVE_CORKSCREW) +#elif defined(WINPR_HAVE_CORKSCREW) winpr_corkscrew_backtrace_free(buffer); #elif defined(_WIN32) || defined(_WIN64) winpr_win_backtrace_free(buffer); @@ -107,9 +107,9 @@ void* winpr_backtrace(DWORD size) { #if defined(USE_UNWIND) return winpr_unwind_backtrace(size); -#elif defined(HAVE_EXECINFO_H) +#elif defined(WINPR_HAVE_EXECINFO_H) return winpr_execinfo_backtrace(size); -#elif defined(HAVE_CORKSCREW) +#elif defined(WINPR_HAVE_CORKSCREW) return winpr_corkscrew_backtrace(size); #elif (defined(_WIN32) || defined(_WIN64)) && !defined(_UWP) return winpr_win_backtrace(size); @@ -132,9 +132,9 @@ char** winpr_backtrace_symbols(void* buffer, size_t* used) #if defined(USE_UNWIND) return winpr_unwind_backtrace_symbols(buffer, used); -#elif defined(HAVE_EXECINFO_H) +#elif defined(WINPR_HAVE_EXECINFO_H) return winpr_execinfo_backtrace_symbols(buffer, used); -#elif defined(HAVE_CORKSCREW) +#elif defined(WINPR_HAVE_CORKSCREW) return winpr_corkscrew_backtrace_symbols(buffer, used); #elif (defined(_WIN32) || defined(_WIN64)) && !defined(_UWP) return winpr_win_backtrace_symbols(buffer, used); @@ -152,7 +152,7 @@ void winpr_backtrace_symbols_fd(void* buffer, int fd) return; } -#if defined(HAVE_EXECINFO_H) && !defined(USE_UNWIND) +#if defined(WINPR_HAVE_EXECINFO_H) && !defined(USE_UNWIND) winpr_execinfo_backtrace_symbols_fd(buffer, fd); #elif !defined(ANDROID) { diff --git a/winpr/libwinpr/utils/sam.c b/winpr/libwinpr/utils/sam.c index b0f3f76eb..2a36fe9c9 100644 --- a/winpr/libwinpr/utils/sam.c +++ b/winpr/libwinpr/utils/sam.c @@ -31,7 +31,7 @@ #include "../log.h" -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif diff --git a/winpr/libwinpr/utils/wlog/Appender.c b/winpr/libwinpr/utils/wlog/Appender.c index c31e8d55e..f4dcce4f1 100644 --- a/winpr/libwinpr/utils/wlog/Appender.c +++ b/winpr/libwinpr/utils/wlog/Appender.c @@ -112,12 +112,12 @@ static wLogAppender* WLog_Appender_New(wLog* log, DWORD logAppenderType) case WLOG_APPENDER_CALLBACK: appender = WLog_CallbackAppender_New(log); break; -#ifdef HAVE_SYSLOG_H +#ifdef WINPR_HAVE_SYSLOG_H case WLOG_APPENDER_SYSLOG: appender = WLog_SyslogAppender_New(log); break; #endif -#ifdef HAVE_JOURNALD_H +#ifdef WINPR_HAVE_JOURNALD_H case WLOG_APPENDER_JOURNALD: appender = WLog_JournaldAppender_New(log); break; diff --git a/winpr/libwinpr/utils/wlog/Appender.h b/winpr/libwinpr/utils/wlog/Appender.h index e834dcca0..61dac377f 100644 --- a/winpr/libwinpr/utils/wlog/Appender.h +++ b/winpr/libwinpr/utils/wlog/Appender.h @@ -26,10 +26,10 @@ #include "ConsoleAppender.h" #include "BinaryAppender.h" #include "CallbackAppender.h" -#ifdef HAVE_JOURNALD_H +#ifdef WINPR_HAVE_JOURNALD_H #include "JournaldAppender.h" #endif -#ifdef HAVE_SYSLOG_H +#ifdef WINPR_HAVE_SYSLOG_H #include "SyslogAppender.h" #endif #include "UdpAppender.h" diff --git a/winpr/libwinpr/utils/wlog/wlog.c b/winpr/libwinpr/utils/wlog/wlog.c index 292132e8e..cc2a1bb4f 100644 --- a/winpr/libwinpr/utils/wlog/wlog.c +++ b/winpr/libwinpr/utils/wlog/wlog.c @@ -145,12 +145,12 @@ static BOOL CALLBACK WLog_InitializeRoot(PINIT_ONCE InitOnce, PVOID Parameter, P else if (_stricmp(env, "BINARY") == 0) logAppenderType = WLOG_APPENDER_BINARY; -#ifdef HAVE_SYSLOG_H +#ifdef WINPR_HAVE_SYSLOG_H else if (_stricmp(env, "SYSLOG") == 0) logAppenderType = WLOG_APPENDER_SYSLOG; -#endif /* HAVE_SYSLOG_H */ -#ifdef HAVE_JOURNALD_H +#endif /* WINPR_HAVE_SYSLOG_H */ +#ifdef WINPR_HAVE_JOURNALD_H else if (_stricmp(env, "JOURNALD") == 0) logAppenderType = WLOG_APPENDER_JOURNALD; diff --git a/winpr/libwinpr/winsock/winsock.c b/winpr/libwinpr/winsock/winsock.c index 04caa97d5..f7c738c0e 100644 --- a/winpr/libwinpr/winsock/winsock.c +++ b/winpr/libwinpr/winsock/winsock.c @@ -24,13 +24,13 @@ #include -#ifdef HAVE_UNISTD_H +#ifdef WINPR_HAVE_UNISTD_H #include #endif -#ifdef HAVE_SYS_FILIO_H +#ifdef WINPR_HAVE_SYS_FILIO_H #include #endif -#ifdef HAVE_SYS_SOCKIO_H +#ifdef WINPR_HAVE_SYS_SOCKIO_H #include #endif