[ifdef] properly check for defined

This commit is contained in:
akallabeth 2023-11-10 08:56:14 +01:00 committed by akallabeth
parent ad44573164
commit 13b44b8b77
5 changed files with 9 additions and 9 deletions

View File

@ -52,7 +52,7 @@
#endif #endif
#endif #endif
#else #else
#if __GNUC__ >= 4 #if defined(__GNUC__) && (__GNUC__ >= 4)
#define FREERDP_API __attribute__((visibility("default"))) #define FREERDP_API __attribute__((visibility("default")))
#else #else
#define FREERDP_API #define FREERDP_API
@ -65,7 +65,7 @@
#if defined _WIN32 || defined __CYGWIN__ #if defined _WIN32 || defined __CYGWIN__
#define FREERDP_LOCAL #define FREERDP_LOCAL
#else #else
#if __GNUC__ >= 4 #if defined(__GNUC__) && (__GNUC__ >= 4)
#define FREERDP_LOCAL __attribute__((visibility("hidden"))) #define FREERDP_LOCAL __attribute__((visibility("hidden")))
#else #else
#define FREERDP_LOCAL #define FREERDP_LOCAL

View File

@ -26,7 +26,7 @@
#include <wayland-client.h> #include <wayland-client.h>
#include <stdbool.h> #include <stdbool.h>
#if __GNUC__ >= 4 #if defined(__GNUC__) && (__GNUC__ >= 4)
#define UWAC_API __attribute__((visibility("default"))) #define UWAC_API __attribute__((visibility("default")))
#else #else
#define UWAC_API #define UWAC_API

View File

@ -22,7 +22,7 @@
#include <stdlib.h> #include <stdlib.h>
#if __clang__ #if defined(__clang__)
#define WINPR_PRAGMA_DIAG_PUSH _Pragma("clang diagnostic push") #define WINPR_PRAGMA_DIAG_PUSH _Pragma("clang diagnostic push")
#define WINPR_PRAGMA_DIAG_IGNORED_PEDANTIC _Pragma("clang diagnostic ignored \"-Wpedantic\"") #define WINPR_PRAGMA_DIAG_IGNORED_PEDANTIC _Pragma("clang diagnostic ignored \"-Wpedantic\"")
#define WINPR_PRAGMA_DIAG_IGNORED_MISSING_PROTOTYPES \ #define WINPR_PRAGMA_DIAG_IGNORED_MISSING_PROTOTYPES \
@ -38,7 +38,7 @@
#define WINPR_PRAGMA_DIAG_IGNORED_FORMAT_SECURITY \ #define WINPR_PRAGMA_DIAG_IGNORED_FORMAT_SECURITY \
_Pragma("clang diagnostic ignored \"-Wformat-security\"") _Pragma("clang diagnostic ignored \"-Wformat-security\"")
#define WINPR_PRAGMA_DIAG_POP _Pragma("clang diagnostic pop") #define WINPR_PRAGMA_DIAG_POP _Pragma("clang diagnostic pop")
#elif __GNUC__ #elif defined(__GNUC__)
#define WINPR_PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push") #define WINPR_PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
#define WINPR_PRAGMA_DIAG_IGNORED_PEDANTIC _Pragma("GCC diagnostic ignored \"-Wpedantic\"") #define WINPR_PRAGMA_DIAG_IGNORED_PEDANTIC _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
#define WINPR_PRAGMA_DIAG_IGNORED_MISSING_PROTOTYPES \ #define WINPR_PRAGMA_DIAG_IGNORED_MISSING_PROTOTYPES \

View File

@ -37,7 +37,7 @@
#endif #endif
#endif #endif
#else #else
#if __GNUC__ >= 4 #if defined(__GNUC__) && (__GNUC__ >= 4)
#define WINPR_API __attribute__((visibility("default"))) #define WINPR_API __attribute__((visibility("default")))
#else #else
#define WINPR_API #define WINPR_API
@ -79,7 +79,7 @@
#if defined _WIN32 || defined __CYGWIN__ #if defined _WIN32 || defined __CYGWIN__
#define WINPR_LOCAL #define WINPR_LOCAL
#else #else
#if __GNUC__ >= 4 #if defined(__GNUC__) && (__GNUC__ >= 4)
#define WINPR_LOCAL __attribute__((visibility("hidden"))) #define WINPR_LOCAL __attribute__((visibility("hidden")))
#else #else
#define WINPR_LOCAL #define WINPR_LOCAL

View File

@ -45,7 +45,7 @@ extern "C"
const map_info_t* map_info_list; const map_info_t* map_info_list;
} memory_t; } memory_t;
#if __i386__ #ifdef __i386__
/* ptrace() register context. */ /* ptrace() register context. */
typedef struct pt_regs_x86 typedef struct pt_regs_x86
{ {
@ -69,7 +69,7 @@ extern "C"
} pt_regs_x86_t; } pt_regs_x86_t;
#endif #endif
#if __mips__ #ifdef __mips__
/* ptrace() GET_REGS context. */ /* ptrace() GET_REGS context. */
typedef struct pt_regs_mips typedef struct pt_regs_mips
{ {