From c38b687ab614fe09ca3a35ab559fba25ff6aaa1f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 11 Dec 2013 22:27:35 -0800 Subject: [PATCH] Add namespace to DEBUG variable, add missing UINT64 type to compat. --- src/protocols/rdp/compat/winpr-wtypes.h | 1 + src/protocols/rdp/debug.h | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/protocols/rdp/compat/winpr-wtypes.h b/src/protocols/rdp/compat/winpr-wtypes.h index 69dbc44e..d0255e30 100644 --- a/src/protocols/rdp/compat/winpr-wtypes.h +++ b/src/protocols/rdp/compat/winpr-wtypes.h @@ -43,6 +43,7 @@ typedef uint8 BYTE; typedef uint8 UINT8; typedef uint16 UINT16; typedef uint32 UINT32; +typedef uint64 UINT64; typedef boolean BOOL; #define TRUE true diff --git a/src/protocols/rdp/debug.h b/src/protocols/rdp/debug.h index 89e3b2e1..65fb87c8 100644 --- a/src/protocols/rdp/debug.h +++ b/src/protocols/rdp/debug.h @@ -40,15 +40,15 @@ #include -/* Ensure DEBUG is defined to a constant */ -#ifndef DEBUG -#define DEBUG 0 +/* Ensure GUAC_RDP_DEBUG_LEVEL is defined to a constant */ +#ifndef GUAC_RDP_DEBUG_LEVEL +#define GUAC_RDP_DEBUG_LEVEL 0 #endif /** * Prints a message to STDERR using the given printf format string and - * arguments. This will only do anything if the DEBUG macro is defined - * and greater than the given log level. + * arguments. This will only do anything if the GUAC_RDP_DEBUG_LEVEL + * macro is defined and greater than the given log level. * * @param level The desired log level (an integer). * @param fmt The format to use when printing. @@ -57,8 +57,8 @@ */ #define GUAC_RDP_DEBUG(level, fmt, ...) \ do { \ - if (DEBUG >= level) \ - fprintf(stderr, "%s:%d: %s(): " fmt "\n", \ + if (GUAC_RDP_DEBUG_LEVEL >= level) \ + fprintf(stderr, "%s:%d: %s(): " fmt "\n", \ __FILE__, __LINE__, __func__, __VA_ARGS__); \ } while (0);