Post by Eric Blake Post by Tim Rühsen
These patches silence tons of warnings here...
In general, we do NOT try to make gnulib .c files '-Wundef'-clean. The
best solution is to not use -Wundef on gnulib compilation (even if you
want to use it on your .c files). Of course, that means that .h files
are in the gray area where we've taken patches to silence -Wundef
warnings in the past.
while i can (and do) give the gnulib files their own CFLAGS, I can't and won't
leave out -Wundef on my own C files. Since these include gnulib's header files,
I am currently swamped with -Wundef warnings. Especially when cross-compiling
for Windows. It is really pretty hard to manually sort out the 'relevant'
warnings between these. It also prevents compiling with -Werror which belongs
to "C best practices", e.g. CI immediately fails when a patch introduces new
However, the patches solve all -Wundef issues at least for my project which
includes many gnulib modules. Also, changing #if to #ifdef at particular
places is no bloat or something, more of a (pedantic) cleanup, so it's
So please consider at least the ENABLE_NLS patch to be applied, since the
related warnings pop up in almost every C file compiled. The OPENSSL related
warnings are less annoying, they just pop up once.