On Sun, Jul 19, 2015 at 11:49:35AM +0200 I heard the voice of
Richard Levitte, and lo! it spake thus:
>
> I'm getting all kinds of other warnings about poorly declared
> symbols, but that's helped by defining _XOPEN_SOURCE and sometimes
> _XOPEN_SOURCE_EXTENDED... which I'd recommend over _POSIX_C_SOURCE,
> btw; it seems more consistent.
Odd; I'm setting both _POSIX_C_SOURCE and _XOPEN_SOURCE in
ctwm_config.h, to the highest levels Fedora 22's features.h knows
about. And that level of _XOPEN_SOURCE _does_ cause
__USE_XOPEN_EXTENDED to be defined as well. So you shouldn't be
getting those warnings, or alternately, #define'ing yourself shouldn't
fix them since the defines are already set.
Maybe I'm being too strict in the condition cmake is checking for
whether to enable the settings? Check the cmake output and/or the
generated build/ctwm_config.h to be sure they're enabled. e.g., on
Fedora, I get:
% make allclean cmake
[...]
-- Looking for include file features.h
-- Looking for include file features.h - found
-- Looking for __USE_ISOC99
-- Looking for __USE_ISOC99 - found
-- Enabling glibc features.h settings.
vs. on BSD libc,
% make allclean cmake
[...]
-- Looking for include file features.h
-- Looking for include file features.h - not found
> I hope it's ok that I just commit when I'm done (sorry for the
> tip-toeing, but I've been away for so long...)
Well, if it's sprinking #define _{POSIX,XOPEN} around the .c files, I
'druther look at it from the "what's {cmake,ctwm_config.h} doing
wrong" perspective so we can have the fix in one place rather than
scattered around. But in the end, if it's as clean as you can make
and it works better than before, what the heck, comment it well and
commit it. If it breaks something else, or somebody else knows a
cleaner way, we can always fix it.
I'm trying to optimize things for the poor schmuck in 2035 who's
looking at one of these files and asking "What the heck is this line
here for, what if anything is it still needed for, and how can I
possibly know what'll break if it I take it out?" I want to keep all
THAT fun for myself 8-}
--
Matthew Fuller (MF4839) | [email protected]
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.