[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slight problem with recent change?
From: |
Paul Eggert |
Subject: |
Re: Slight problem with recent change? |
Date: |
Thu, 09 Jun 2005 01:37:01 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Paul Hilfinger <address@hidden> 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(address@hidden@], address@hidden@])[
# 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 */