[postgis-devel] [PostGIS] #126: Don't include private PROJ.4 header projects.h
PostGIS
trac at osgeo.org
Mon Feb 6 01:42:28 PST 2012
#126: Don't include private PROJ.4 header projects.h
---------------------------+------------------------------------------------
Reporter: mloskot | Type: task
Status: closed | Priority: medium
Milestone: PostGIS 1.4.0 | Component: postgis
Version: 1.4 | Resolution: fixed
Keywords: |
---------------------------+------------------------------------------------
Old description:
> In current SVN trunk, PostGIS file lwgeom_transform.c includes private
> header of PROJ.4 - projects.h.
> This header is...private and should not be included form PROJ.4 client
> code.
> Instead, proj_api.h should be used. However, replacing these headers
> requires number of changes in lwgeom_transform.c. For instance, use API
> call(s) instead of accessing internal structures:
>
> current code:
>
> if( !srcdefn->is_latlong )
>
> new code:
>
> if( !pj_is_latlong( srcdefn ) )
>
> Including private header projects.h makes it impossible to compile using
> Microsoft Visual C++ compiler, becasue of well-known conflicts with
> definitions from windows.h. Here is confirmation of existence of that
> issue: [http://lists.osgeo.org/pipermail/gdal-dev/2005-May/005669.html
> http://lists.osgeo.org/pipermail/gdal-dev/2005-May/005669.html]
>
> I've just (re)hit this problem and it stops me from moving forward with
> building PostGIS using Visual C++.
New description:
In current SVN trunk, PostGIS file lwgeom_transform.c includes private
header of PROJ.4 - projects.h.
This header is...private and should not be included form PROJ.4 client
code.
Instead, proj_api.h should be used. However, replacing these headers
requires number of changes in lwgeom_transform.c. For instance, use API
call(s) instead of accessing internal structures:
current code:
if( !srcdefn->is_latlong )
new code:
if( !pj_is_latlong( srcdefn ) )
Including private header projects.h makes it impossible to compile using
Microsoft Visual C++ compiler, becasue of well-known conflicts with
definitions from windows.h. Here is confirmation of existence of that
issue: [http://lists.osgeo.org/pipermail/gdal-dev/2005-May/005669.html
http://lists.osgeo.org/pipermail/gdal-dev/2005-May/005669.html]
I've just (re)hit this problem and it stops me from moving forward with
building PostGIS using Visual C++.
--
Comment(by strk):
This ticket lacks a reference to a revision id, ouch...
I think it was r3827 (thanks GIT for making the research so easy :)
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/126#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list