tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

_NETBSD_SOURCE always defined leading to unwanted inclusions



[I changed the subject because this was lost in the end of a message
about _STANDALONE]

When one does not specify something special (_ANSI_SOURCE or
_POSIX_C_SOURCE or _XOPEN_SOURCE), _NETBSD_SOURCE is always defined
due to the inclusion of sys/featuretest.h almost everywhere.

This leads to the inclusion of some chunks of code in <sys/time.h>,
specially the definition of static functions (supposed to be inlined but
this will depend on the compiler and on the flags--- -fno-inline).

A first problem (YMMV) is that <time.h> can not be included anywhere
but only outside of a block, since there are definitions and not only
declarations.

The second problem is that the functions are not prefixed by '_' and can
conflict with locally defined functions.

FWIW,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index