On 23/09/27 03:50PM, Arthur Jacquin wrote:
> termbox2.h is not C99 compliant, yet the -std=c99 compilation flag is
> set in the default configuration. On the compilers I tried, it has not
> been a problem as the non-C99 parts were ignored, but I shouldn't have
> assumed it would always be this way. Sorry for the annoyance.

Which parts of termbox2.h are not C99 compliant? What compiler doesn't "ignore" 
the non-C99 compliant code when -std=c99 is passed?

I maintain my own simple editor called sled[1], which uses termbox2.h and 
passes `-std=c99` as a default flag. I have compiled it using GCC, Clang/LLVM, 
tinycc, on (GNU/)Linux and OpenBSD, and I have yet to encounter any errors.

I tried compiling your program using `CC=c99` (script wrapper to GCC) and 
passing `-std=c99`, and there are only some warnings about implicitly declared 
functions, nothing about `struct sigaction`. In any case, you can simply 
include the needed headers prior to including termbox2.h (my program uses 
signal.h to redraw after C-Z, so I include it anyway).

[1]: https://strahinja.srht.site/sled/

Attachment: signature.asc
Description: PGP signature

Reply via email to