Opened 15 years ago

Last modified 12 years ago

#126 closed task (fixed)

Don't include private PROJ.4 header projects.h

Reported by: mloskot Owned by:
Priority: medium Milestone: PostGIS 1.4.0
Component: postgis Version: 1.4
Keywords: Cc:

Description (last modified by strk)

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

I've just (re)hit this problem and it stops me from moving forward with building PostGIS using Visual C++.

Change History (4)

comment:1 by mcayland, 15 years ago

Hi Mateusz,

I've just committed the fix for this to SVN trunk. Can you please test and report back?

ATB,

Mark.

comment:2 by mloskot, 15 years ago

Mark,

I confirm it works for me. Thanks!

comment:3 by mcayland, 15 years ago

Excellent. Status changed to Fixed.

ATB,

Mark.

comment:4 by strk, 12 years ago

Description: modified (diff)

This ticket lacks a reference to a revision id, ouch…

I think it was r3827 (thanks GIT for making the research so easy :)

Note: See TracTickets for help on using tickets.