[geos-devel] headers layout & versioning
strk at keybit.net
Mon Jun 21 18:58:47 EDT 2004
I've added a geos_version.h which gets created by ./configure
with values set in configure.in. It contains the following defines:
The file is installed by the 'install' Makefile rule.
I dunno how this is handled by Win, but I think it was handled
somehow already, can you tell us more about this Yury ?
I'd put runtime version extractor functions in geom.h and
Geometry.cpp, comments ?
About headers layout, we could provide a geos.h header file
including geom.h AND geos_version.h, and it should also
include utils.h, which contains GEOSException definition ...
Ideally this file could include *all* geos headers giving
all of GEOS support from a single include.
One problem I see about headers layout is that some header files
(like utils.h or platform.h) have too generic names, making it
possible to conflict with system or other packages headers (most
probably client application headers).
A possible solution I see is having geos.h include all GEOS
headers using the geos/ prefix, and require client application
rely on geos-config --cflags or equivalent include path. Still
geom.h includes "platform.h" which would be unfindable in this case,
and I dunno how many other header files use this cross inclusions.
Another solution would be to rename all "ambiguos" files to be
prefixed by geos_. Note though, that geos-config --cflags should
be corrected to reflect "suggested" use, as current output "suggests"
prefixing geos header inclusions with 'geos/'.
How do you see it ? Are these fake problems ?
More information about the geos-devel