From bc028bcc2cf0b6792be4066b4ea2e15ca0becb9a Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 9 Aug 2020 02:53:21 +0000 Subject: Fix build; gcc does not like VLA's, so hard code the boundary Use c99 initializers --- usr.bin/make/enum.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/make/enum.h') diff --git a/usr.bin/make/enum.h b/usr.bin/make/enum.h index c47b9ef0196..7979c0cb1b8 100644 --- a/usr.bin/make/enum.h +++ b/usr.bin/make/enum.h @@ -1,4 +1,4 @@ -/* $NetBSD: enum.h,v 1.2 2020/08/08 14:43:28 rillig Exp $ */ +/* $NetBSD: enum.h,v 1.3 2020/08/09 02:53:21 christos Exp $ */ /* Copyright (c) 2020 Roland Illig @@ -59,8 +59,10 @@ const char *Enum_ToString(char *, size_t, int, const EnumToStringSpec *); #v1 ENUM__SEP ENUM__JOIN_6(v2, v3, v4, v5, v6, v7) #define ENUM__RTTI(typnam, specs, joined) \ - static const EnumToStringSpec typnam ## _ ## ToStringSpecs[] = specs; \ + static const EnumToStringSpec typnam ## _ ## ToStringSpecs[] = specs; +#if 0 static const size_t typnam ## _ ## ToStringSize = sizeof joined +#endif #define ENUM__SPEC(v) { v, #v } -- cgit