bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tim-1] hash.h uses undefined macro __P()


From: Tim Van Holder
Subject: [tim-1] hash.h uses undefined macro __P()
Date: Sun, 6 Jan 2002 18:33:45 +0100

The first of a couple of patches against CVS HEAD; mostly
in order to get it compiling properly on DJGPP.

lib/hash.h uses a macro (__P) for prototype support.  But
that macro is not defined.
This might be a glibc-induced problem (maybe glibc defines
__P?); if that is the case, it would probably be best to
rename the macro to __PROTO (as cvs does).

2002-01-06  Tim Van Holder  <address@hidden>

        * lib/hash.h (__P): Define this macro.

Index: lib/hash.h
===================================================================
RCS file: /cvsroot/bison/bison/lib/hash.h,v
retrieving revision 1.4
diff -u -r1.4 hash.h
--- lib/hash.h  10 Dec 2001 09:05:47 -0000      1.4
+++ lib/hash.h  6 Jan 2002 16:08:32 -0000
@@ -21,6 +21,12 @@
 
 #include <stdio.h>
 
+#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
+#define __P(args) args
+#else
+#define __P(args) ()
+#endif  /* GCC.  */
+
 typedef unsigned long (*hash_func_t) __P((void const *key));
 typedef int (*hash_cmp_func_t) __P((void const *x, void const *y));
 typedef void (*hash_map_func_t) __P((void const *item));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]