* name strings can be used directly in error messages and there is no
* need for any string processing.
*/
-#define yytnamerr(a, b) cdecl__strlcpy(a, b, (a) ? INT_MAX : 0)
+#define yytnamerr(a, b) ( (a) ? yytnamerr_copy(a, b) \
+ : strlen(b) )
+
+static size_t yytnamerr_copy(char *dst, const char *src)
+{
+ return cdecl__strlcpy(dst, src, strlen(src)+1);
+}
%}
%code requires {
#include <inttypes.h>
+#include <stdbool.h>
}
%code provides {
%union {
uintmax_t uintval;
unsigned spectype;
- _Bool boolval;
+ bool boolval;
struct cdecl_declspec *declspec;
struct cdecl_declarator *declarator;
struct cdecl *decl;