From d8a35ffa500deb8b00d9669b7e490e705c54c748 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 27 Apr 2009 14:51:59 +0000 Subject: [PATCH] Perform some black and midnight cpp witchcraft to get rid of GRID_DEBUG, to fix building with -DDEBUG on gcc2 platforms. From joshe. --- tmux.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tmux.h b/tmux.h index ec9ba670..c8cc4ac6 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.301 2009-04-27 13:21:16 tcunha Exp $ */ +/* $Id: tmux.h,v 1.302 2009-04-27 14:51:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -462,7 +462,9 @@ struct mode_key_data { #define MODE_MOUSE 0x10 /* Grid output. */ -#ifdef DEBUG +#if defined(DEBUG) && \ + ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + (defined(__GNUC__) && __GNUC__ >= 3)) #define GRID_DEBUG(gd, fmt, ...) log_debug3("%s: (sx=%u, sy=%u, hsize=%u) " \ fmt, __func__, (gd)->sx, (gd)->sy, (gd)->hsize, ## __VA_ARGS__) #else