]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around small preprocessor bugs in sunos4 pcc and MinGW.
authorFrancesco Potortì <pot@gnu.org>
Wed, 31 Jan 2001 08:53:56 +0000 (08:53 +0000)
committerFrancesco Potortì <pot@gnu.org>
Wed, 31 Jan 2001 08:53:56 +0000 (08:53 +0000)
lib-src/ChangeLog
lib-src/etags.c

index d7685bfe124a32d82ee6787e492218c5576dd4b8..9691dddf9fdce8837493199dbcfe2ac2d052c0fc 100644 (file)
@@ -1,3 +1,11 @@
+2001-01-31  Francesco Potorti`  <pot@gnu.org>
+
+       * 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  <andrewi@gnu.org>
 
        * etags.c (assert) [__MINGW32__]: Redefine assert to work around a
index e17aefbc557f4d1699d2d827221ae3eecbe6ebba..2071fb52b2f8fbaf8322c4c27fb5bc1cef997340 100644 (file)
@@ -32,7 +32,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  *     Francesco Potortì <pot@gnu.org> 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 <assert.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
-/* Work around bug in Mingw assert.h.  */
-#if defined (__MINGW32__) && defined(NDEBUG) && defined (assert)
-#undef assert
-#define assert(x) ((void) 0)
+#include <assert.h>
+#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;