Attention is currently required from: Alexander Goncharov, Anton Samsonov, Anton Samsonov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/77089?usp=email )
Change subject: Remove dependency on C23 __has_include() ......................................................................
Patch Set 1:
(1 comment)
File include/cli_classic.h:
https://review.coreboot.org/c/flashrom/+/77089/comment/da0c1e4b_a9ffa4f9 : PS1, Line 18: #if HAVE_GETOPT_H : #include <getopt.h> : #elif !defined(HAVE_GETOPT_H) : #if !defined(__has_include) && (__STDC_VERSION__ < 202300L) : #include <getopt.h> : #define HAVE_GETOPT_H 1 : #elif __has_include(<getopt.h>) : #include <getopt.h> : #define HAVE_GETOPT_H 1 : #else : #define HAVE_GETOPT_H 0 : #endif /* __has_include() */ : #endif /* HAVE_GETOPT_H */ : : #if !HAVE_GETOPT_H
Our and coreboot code styles say nothing about directives. […]
Sorry it took me some time to get to this patch. It's hard to read yes, but I suspect 15 lines of pre-processor would be hard to read anyway :\ I would be so happy to remove pre-processor altogether, as I said in my other comment.
With or without style guide, I would first try to resolve this with build system.