From 8d44bd8e6902dbb49e98c12bb6bf3d9e4c4b413f Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 23 Jan 2026 08:57:19 +0100 Subject: added CHECK_EOF to work around warnings about EOF and -1 being the same --- plugins/common.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/common.h') diff --git a/plugins/common.h b/plugins/common.h index b3053486..9d1434a3 100644 --- a/plugins/common.h +++ b/plugins/common.h @@ -205,4 +205,11 @@ enum { # define __attribute__(x) /* do nothing */ #endif +/* for checking the result of getopt_long */ +#if EOF == -1 +#define CHECK_EOF(c) ((c) == EOF) +#else +#define CHECK_EOF(c) ((c) == -1 || (c) == EOF) +#endif + #endif /* _COMMON_H_ */ -- cgit v1.2.3-74-g34f1