summaryrefslogtreecommitdiff
path: root/usr.bin/make/enum.h
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2020-08-09 02:53:21 +0000
committerchristos <christos@NetBSD.org>2020-08-09 02:53:21 +0000
commitbc028bcc2cf0b6792be4066b4ea2e15ca0becb9a (patch)
treece910a0b927e30d7c23c09ee40a44c8b43bbf8fb /usr.bin/make/enum.h
parent3a0f346aa79221a6730262f731a6a784d3bbf005 (diff)
Fix build; gcc does not like VLA's, so hard code the boundary
Use c99 initializers
Diffstat (limited to 'usr.bin/make/enum.h')
-rw-r--r--usr.bin/make/enum.h6
1 files changed, 4 insertions, 2 deletions
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 <rillig@NetBSD.org>
@@ -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 }