diff -ur doxygen-1.6.2-20100124/src/pre.l doxygen-1.6.2-20100201/src/pre.l
--- doxygen-1.6.2-20100124/src/pre.l	2010-01-25 14:44:38.000000000 +0100
+++ doxygen-1.6.2-20100201/src/pre.l	2010-02-02 11:44:50.764640957 +0100
@@ -1895,11 +1895,19 @@
 					  g_defLitText.resize(0);
 					  g_defName = yytext;
 					  g_defVarArgs = FALSE;
-					  QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
-					  outputArray(tmp.data(),tmp.length());
-					  g_quoteArg=FALSE;
-					  g_insideComment=FALSE;
-					  BEGIN(DefineText); 
+					  if ( g_defName!=g_lastGuardName || !g_expectGuard)
+					  { // define may appear in the output
+					    QCString tmp=(QCString)"#define "+g_defName;
+					    outputArray(tmp.data(),tmp.length());
+					    g_quoteArg=FALSE;
+					    g_insideComment=FALSE;
+					    BEGIN(DefineText); 
+					  }
+					  else // define is a guard => hide
+					  {
+					    g_lastGuardName.resize(0);
+					    BEGIN(Start);
+					  }
   					}
 <DefName>{ID}/{B}*"\n"			{ // bare define
   					  g_argDict = 0;
