Attention is currently required from: Alexander Goncharov, Anastasia Klimchuk, Anton Samsonov, Thomas Heijligen.
4 comments:
Patchset:
Appreciate your explanation. I don't think there's any point in describing it in the commit message. […]
Done
I would avoid introducing new pre-processor conditionals, because we are planning to go in the oppos […]
I totally agree with all your and Alexander's propositions, however have no knowledge of how to test for header presence without preprocessor conditionals — whether it is C23's `__has_include()` check or autoconf's `HAVE_..._H` macro. I went for the latter and tried to adapt not only the Makefile (which I only care about currently), but meson.build as well (which I am not familiar with). While meson also succeeds on both my test systems with different software versions, it fails here on Jenkins, and I have no idea why.
File include/cli_classic.h:
#if !defined(__has_include) && (__STDC_VERSION__ < 202300L)
#include <getopt.h>
#define HAVE_GETOPT_H 1
If we cannot identify whether this header file exists on the user's system, then let's assume it doe […]
Done
#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
Sorry it took me some time to get to this patch. […]
Done
To view, visit change 77089. To unsubscribe, or for help writing mail filters, visit settings.