Paul Hilfinger <[EMAIL PROTECTED]> writes:
> If defined (__cplusplus), shouldn't those declarations be enclosed in
>
> extern "C" {
> ...
> }
>
> ?
I'll take your word for it. (I don't use C++.)
Does the following patch fix things? Is it good style for C++?
Are you allowed to say
extern "C" {}
in C++?
--- yacc.c.~1.91.~ 2005-05-30 10:18:35 -0700
+++ yacc.c 2005-06-09 01:35:09 -0700
@@ -262,6 +262,9 @@ b4_syncline([EMAIL PROTECTED]@], [EMAIL PROTECTED]@])[
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
@@ -276,6 +279,9 @@ void *malloc (YYSIZE_T); /* INFRINGES ON
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
+# ifdef __cplusplus
+}
+# endif
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */