core-geth
core-geth copied to clipboard
Incorrect macro result in appveyer continuous integration fail
For example: https://ci.appveyor.com/project/meowsbits/core-geth/builds/53045406
In file included from C:\Users\appveyor\go\pkg\mod\github.com\supranational\[email protected]\bindings\go\blst.go:16: C:/Users/appveyor/go/pkg/mod/github.com/supranational/[email protected]/bindings/blst.h:27:15: error: 'bool' cannot be defined via 'typedef' 27 | typedef _Bool bool; /* it's assumed that cgo calls modern enough compiler */ | ^~~~
In github.com/supranational/[email protected]/bindings/blst.h
#ifdef __cplusplus
extern "C" {
#elif defined(__BLST_CGO__)
typedef _Bool bool; /* it's assumed that cgo calls modern enough compiler */
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901
# define bool _Bool
#else
# define bool int
#endif
The first version to change this macro is v0.3.14:
#ifdef __cplusplus
extern "C" {
#elif !defined(__STDC_VERSION__) || __STDC_VERSION__<202311
# if defined(__BLST_CGO__)
typedef _Bool bool; /* it's assumed that cgo calls modern enough compiler */
# elif !defined(bool)
# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901
# define bool _Bool
# else
# define bool int
# endif
# define __blst_h_bool__
# endif
#endif
The later directives are more reasonable.