Given this C code:
enum uv_tcp_flags {
/* Used with uv_tcp_bind, when an IPv6 address is used. */
UV_TCP_IPV6ONLY = 1
};
The following cffi-grovel form fails:
(bitfield (uv-tcp-flags)
((:ipv6-only "UV_TCP_IPV6ONLY")))
The C-file generated by cffi-grovel looks like this:
/* bitfield section for UV-TCP-FLAGS */
fputs("(cffi:defbitfield (", output);
fputs("uv-tcp-flags", output);
fputs(")", output);
fputs("\n (", output);
fputs(":ipv6-only", output);
fputs(" ", output);
#ifdef UV_TCP_IPV6ONLY
fprintf(output, "%d", UV_TCP_IPV6ONLY);
#else
fputs("\n #.(cl:progn (cl:warn 'cffi-grovel:missing-definition :name
'IPV6-ONLY) -1)", output);
#endif
fputs(")", output);
fputs(")\n", output);
Obviously the #ifdef guard is the culprit here. Maybe you guys want to
fix this?