# HG changeset patch # User Francesco Potort # Date 980931236 0 # Node ID aa069bbee4c84c3584357a5ff9b1b113e2c017d8 # Parent 4550a38f48e568dbbeba34f8b28c5a3b58208e06 Work around small preprocessor bugs in sunos4 pcc and MinGW. diff -r 4550a38f48e5 -r aa069bbee4c8 lib-src/ChangeLog --- a/lib-src/ChangeLog Wed Jan 31 08:32:22 2001 +0000 +++ b/lib-src/ChangeLog Wed Jan 31 08:53:56 2001 +0000 @@ -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 -r 4550a38f48e5 -r aa069bbee4c8 lib-src/etags.c --- a/lib-src/etags.c Wed Jan 31 08:32:22 2001 +0000 +++ b/lib-src/etags.c Wed Jan 31 08:53:56 2001 +0000 @@ -32,7 +32,7 @@ * 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 @@ #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 @@ lp += 2; toklen += 2; c = lp[-1]; - goto intoken; + goto still_in_token; } else { @@ -3105,7 +3104,7 @@ } } /* if (endtoken (c)) */ else if (intoken (c)) - intoken: + still_in_token: { toklen++; continue;