From 8f79fe7269e1cae1fb6e63a4d5943da36ee22fc3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Francesco=20Potort=C3=AC?= Date: Wed, 31 Jan 2001 08:53:56 +0000 Subject: [PATCH] Work around small preprocessor bugs in sunos4 pcc and MinGW. --- lib-src/ChangeLog | 8 ++++++++ lib-src/etags.c | 15 +++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index d7685bfe12..9691dddf9f 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,11 @@ +2001-01-31 Francesco Potorti` + + * etags.c: [NDEBUG] #undef assert and #define it as ((void)0), for + the sake of some buggy assert.h (e.g. in MinGW and sunos4 pcc). + (C_entries): Tag token renamed to still_in_token because sunos4 + pcc wants to expand it as the token() macro even though it has no + arguments. + 2001-01-30 Andrew Innes * etags.c (assert) [__MINGW32__]: Redefine assert to work around a diff --git a/lib-src/etags.c b/lib-src/etags.c index e17aefbc55..2071fb52b2 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -32,7 +32,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ * Francesco Potortì has maintained it since 1993. */ -char pot_etags_version[] = "@(#) pot revision number is 14.13"; +char pot_etags_version[] = "@(#) pot revision number is $Revision: 14.14 $"; #define TRUE 1 #define FALSE 0 @@ -122,14 +122,13 @@ char pot_etags_version[] = "@(#) pot revision number is 14.13"; #ifndef errno extern int errno; #endif -#include #include #include -/* Work around bug in Mingw assert.h. */ -#if defined (__MINGW32__) && defined(NDEBUG) && defined (assert) -#undef assert -#define assert(x) ((void) 0) +#include +#ifdef NDEBUG +# undef assert /* some systems have a buggy assert.h */ +# define assert(x) ((void) 0) #endif #if !defined (S_ISREG) && defined (S_IFREG) @@ -2983,7 +2982,7 @@ C_entries (c_ext, inf) lp += 2; toklen += 2; c = lp[-1]; - goto intoken; + goto still_in_token; } else { @@ -3105,7 +3104,7 @@ C_entries (c_ext, inf) } } /* if (endtoken (c)) */ else if (intoken (c)) - intoken: + still_in_token: { toklen++; continue; -- 2.20.1