diff --git a/cmd/puffs-gen-c/data.go b/cmd/puffs-gen-c/data.go index 0abce79b..7fd3133c 100644 --- a/cmd/puffs-gen-c/data.go +++ b/cmd/puffs-gen-c/data.go @@ -6,5 +6,5 @@ package main const preamble = "" + - "// Use of this source code is governed by a BSD-style license that can be found\n// in the LICENSE file.\n\n#include \n" + + "// Use of this source code is governed by a BSD-style license that can be found\n// in the LICENSE file.\n\n#include \n\n#if __WORDSIZE < 32\n#error \"Puffs requires a word size of at least 32 bits\"\n#endif\n" + "" diff --git a/cmd/puffs-gen-c/preamble.h b/cmd/puffs-gen-c/preamble.h index ebcc7e23..eae69c87 100644 --- a/cmd/puffs-gen-c/preamble.h +++ b/cmd/puffs-gen-c/preamble.h @@ -4,3 +4,7 @@ // in the LICENSE file. #include + +#if __WORDSIZE < 32 +#error "Puffs requires a word size of at least 32 bits" +#endif diff --git a/gen/c/gif.c b/gen/c/gif.c index 397da97c..7e827606 100644 --- a/gen/c/gif.c +++ b/gen/c/gif.c @@ -5,6 +5,10 @@ #include +#if __WORDSIZE < 32 +#error "Puffs requires a word size of at least 32 bits" +#endif + #ifdef __cplusplus extern "C" { #endif