> I think the objectives are obvious. A programmer not working on the
> operating systems interface shouldn't see whether _WIN32 nor
> HAVE_SOME_FUNCTION. This isn't only "ugly" it's dangerous too. He
> had to know all these _SOME_FUNCTIONs.
Agreed, though hopefully or ideally in every case, the
HAVE_SOME_FUNCTION names should be automatically generated from the
feature being checked instead of being arbitrarily defined by us.
For example, a check for whether printf is available is HAVE_PRINTF,
a check for the sys/types.h header file is HAVE_SYS_TYPES_H, a check
for fork is HAVE_FORK. You get the idea, hopefully.
This is also on-going effort to remove the few "special" defines
(like USE_STDLIB_H) that were created/migrated from the previous
build system. The old 'conf.h' header was very much like
'machine.h', defining features that are now effectively defined
automatically by the configure process. With standardization on the
HAVE_BLAH_BLAH names, it then boils down to a simple reference list
of which functions, types, and headers are not necessarily available
> machine.h defines the fastf_t type. I thought fastf_t is the
> recommended float type.
The fastf_t type is indeed the generally recommended floating point
type since it allows for compile-time optimization to the fastest
floating point type (be it double, float, or some other type). So if
you use fastf_t or are looking at some code that does, then it would
of course need to include machine.h.
When I mentioned that machine.h is going away, that doesn't mean that
the constructs in that header are going away. They are just moving
to other files or changing to different constructs. The fastf_t
type, for example, will likely become a configure test that actually
evaluates the performance of each floating point type and/or allows
for configuration overrides. The actual typedef would then be
provided by the brlcad_config.h and config_win.h headers. Constructs
like CONST, SIGNED, LOCAL, FAST, etc that are also in machine.h would
similarly be subsumed by the equivalent configure checks (which are
actually already in place).