[proj] 01/02: Add upstream patches from 5.0 branch:

Bas Couwenberg sebastic at debian.org
Mon Mar 12 14:14:21 UTC 2018


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository proj.

commit e893a91ff8c10b9618a92fbff860cf4a0545f7ed
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Mar 12 15:07:11 2018 +0100

    Add upstream patches from 5.0 branch:
    
    Add upstream patches from 5.0 branch:
    - Remove-angle-brackets-for-proj-headers.patch
    - Remove-pj_-prefix-from-static-functions.patch
    - Make-sure-that-transient-errors-are-returned-correctly.patch
      Should fix python-mpop test failure.
---
 debian/changelog                                   |   10 +
 ...t-transient-errors-are-returned-correctly.patch |  181 +++
 .../Remove-angle-brackets-for-proj-headers.patch   | 1227 ++++++++++++++++++++
 .../Remove-pj_-prefix-from-static-functions.patch  |  652 +++++++++++
 debian/patches/series                              |    3 +
 5 files changed, 2073 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 43f4a23..b31394c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+proj (5.0.0-4) UNRELEASED; urgency=medium
+
+  * Add upstream patches from 5.0 branch:
+    - Remove-angle-brackets-for-proj-headers.patch
+    - Remove-pj_-prefix-from-static-functions.patch
+    - Make-sure-that-transient-errors-are-returned-correctly.patch
+      Should fix python-mpop test failure.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Mon, 12 Mar 2018 15:03:44 +0100
+
 proj (5.0.0-3) unstable; urgency=medium
 
   * Update pj_transform-height_unit.patch which changes as applied upstream.
diff --git a/debian/patches/Make-sure-that-transient-errors-are-returned-correctly.patch b/debian/patches/Make-sure-that-transient-errors-are-returned-correctly.patch
new file mode 100644
index 0000000..9147142
--- /dev/null
+++ b/debian/patches/Make-sure-that-transient-errors-are-returned-correctly.patch
@@ -0,0 +1,181 @@
+Description: Make sure that transient errors are returned correctly
+Author: Kristian Evers <kristianevers at gmail.com>
+Origin: https://github.com/OSGeo/proj.4/commit/c4895fdf89254e4969f474355c28d67e7dc7e74d
+
+--- a/src/pj_fwd.c
++++ b/src/pj_fwd.c
+@@ -174,11 +174,22 @@ static PJ_COORD fwd_finalize (PJ *P, PJ_
+ }
+ 
+ 
++static PJ_COORD error_or_coord(PJ *P, PJ_COORD coord, int last_errno) {
++    if (proj_errno(P))
++        return proj_coord_error();
++
++    proj_errno_restore(P, last_errno);
++    return coord;
++}
++
+ 
+ XY pj_fwd(LP lp, PJ *P) {
++    int last_errno;
+     PJ_COORD coo = {{0,0,0,0}};
+     coo.lp = lp;
+ 
++    last_errno = proj_errno_reset(P);
++
+     if (!P->skip_fwd_prepare)
+         coo = fwd_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+@@ -200,15 +211,19 @@ XY pj_fwd(LP lp, PJ *P) {
+ 
+     if (!P->skip_fwd_finalize)
+         coo = fwd_finalize (P, coo);
+-    return coo.xy;
++
++    return error_or_coord(P, coo, last_errno).xy;
+ }
+ 
+ 
+ 
+ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
++    int last_errno;
+     PJ_COORD coo = {{0,0,0,0}};
+     coo.lpz = lpz;
+ 
++    last_errno = proj_errno_reset(P);
++
+     if (!P->skip_fwd_prepare)
+         coo = fwd_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+@@ -230,12 +245,15 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
+ 
+     if (!P->skip_fwd_finalize)
+         coo = fwd_finalize (P, coo);
+-    return coo.xyz;
++
++    return error_or_coord(P, coo, last_errno).xyz;
+ }
+ 
+ 
+ 
+ PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P) {
++    int last_errno = proj_errno_reset(P);
++
+     if (!P->skip_fwd_prepare)
+         coo = fwd_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+@@ -257,5 +275,6 @@ PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P)
+ 
+     if (!P->skip_fwd_finalize)
+         coo = fwd_finalize (P, coo);
+-    return coo;
++
++    return error_or_coord(P, coo, last_errno);
+ }
+--- a/src/pj_inv.c
++++ b/src/pj_inv.c
+@@ -172,11 +172,22 @@ static PJ_COORD inv_finalize (PJ *P, PJ_
+ }
+ 
+ 
++static PJ_COORD error_or_coord(PJ *P, PJ_COORD coord, int last_errno) {
++    if (proj_errno(P))
++        return proj_coord_error();
++
++    proj_errno_restore(P, last_errno);
++    return coord;
++}
++
+ 
+ LP pj_inv(XY xy, PJ *P) {
++    int last_errno;
+     PJ_COORD coo = {{0,0,0,0}};
+     coo.xy = xy;
+ 
++    last_errno = proj_errno_reset(P);
++
+     if (!P->skip_inv_prepare)
+         coo = inv_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+@@ -198,15 +209,19 @@ LP pj_inv(XY xy, PJ *P) {
+ 
+     if (!P->skip_inv_finalize)
+         coo = inv_finalize (P, coo);
+-    return coo.lp;
++
++    return error_or_coord(P, coo, last_errno).lp;
+ }
+ 
+ 
+ 
+ LPZ pj_inv3d (XYZ xyz, PJ *P) {
++    int last_errno;
+     PJ_COORD coo = {{0,0,0,0}};
+     coo.xyz = xyz;
+ 
++    last_errno = proj_errno_reset(P);
++
+     if (!P->skip_inv_prepare)
+         coo = inv_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+@@ -228,12 +243,15 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
+ 
+     if (!P->skip_inv_finalize)
+         coo = inv_finalize (P, coo);
+-    return coo.lpz;
++
++    return error_or_coord(P, coo, last_errno).lpz;
+ }
+ 
+ 
+ 
+ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) {
++    int last_errno = proj_errno_reset(P);
++
+     if (!P->skip_inv_prepare)
+         coo = inv_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+@@ -255,5 +273,6 @@ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P)
+ 
+     if (!P->skip_inv_finalize)
+         coo = inv_finalize (P, coo);
+-    return coo;
++
++    return error_or_coord(P, coo, last_errno);
+ }
+--- a/test/gie/4D-API_cs2cs-style.gie
++++ b/test/gie/4D-API_cs2cs-style.gie
+@@ -186,4 +186,32 @@ tolerance 20 cm
+ accept    7.438632495 46.951082877
+ expect    2600000.0  1200000.0
+ -------------------------------------------------------------------------------
++
++-------------------------------------------------------------------------------
++Make sure that transient errors are returned correctly.
++-------------------------------------------------------------------------------
++operation +proj=geos +lon_0=0.00 +lat_0=0.00 +a=6378169.00 +b=6356583.80 +h=35785831.0
++-------------------------------------------------------------------------------
++accept  85.05493299 46.5261074
++expect  failure
++
++accept  85.05493299 46.5261074 0
++expect  failure
++
++accept  85.05493299 46.5261074 0 0
++expect  failure
++
++-------------------------------------------------------------------------------
++Test that Google's Web Mercator works as intended (see #834 for details).
++-------------------------------------------------------------------------------
++operation   proj=pipeline step init=epsg:26915 inv step init=epsg:3857
++-------------------------------------------------------------------------------
++tolerance   20 cm
++accept      487147.594520173    4934316.46263998
++expect      -10370728.80        5552839.74
++
++accept      487147.594520173    4934316.46263998    0
++expect      -10370728.80        5552839.74          0
++-------------------------------------------------------------------------------
++
+ </gie>
diff --git a/debian/patches/Remove-angle-brackets-for-proj-headers.patch b/debian/patches/Remove-angle-brackets-for-proj-headers.patch
new file mode 100644
index 0000000..fe93738
--- /dev/null
+++ b/debian/patches/Remove-angle-brackets-for-proj-headers.patch
@@ -0,0 +1,1227 @@
+Description: Remove angle brackets for proj headers (#849)
+ * Avoid using angle brackets for PROJ headers.
+ .
+ Switching from #include <proj.h> to #include "proj.h",
+ and correspondingly for projects.h and proj_api.h,
+ reduces the risk of accidentally picking up a system
+ installed older version of the header while building
+ a new version of PROJ.
+Author: Thomas Knudsen <busstoptaktik at users.noreply.github.com>
+Origin: https://github.com/OSGeo/proj.4/commit/2b143b4829f058fd98919e064b78a501c5110652
+
+--- a/src/PJ_aea.c
++++ b/src/PJ_aea.c
+@@ -28,7 +28,7 @@
+  *****************************************************************************/
+ 
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include <errno.h>
+ #include "projects.h"
+ 
+--- a/src/PJ_aeqd.c
++++ b/src/PJ_aeqd.c
+@@ -27,7 +27,7 @@
+ 
+ #define PJ_LIB__
+ #include "geodesic.h"
+-#include <proj.h>
++#include "proj.h"
+ #include <errno.h>
+ #include "projects.h"
+ 
+--- a/src/PJ_airy.c
++++ b/src/PJ_airy.c
+@@ -27,7 +27,7 @@
+  *****************************************************************************/
+ 
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include <errno.h>
+ #include "projects.h"
+ 
+--- a/src/PJ_aitoff.c
++++ b/src/PJ_aitoff.c
+@@ -29,7 +29,7 @@
+  *****************************************************************************/
+ 
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include <errno.h>
+ #include "projects.h"
+ 
+--- a/src/PJ_bacon.c
++++ b/src/PJ_bacon.c
+@@ -2,7 +2,7 @@
+ # define EPS	1e-10
+ #define PJ_LIB__
+ #include	<errno.h>
+-#include	<projects.h>
++#include	"projects.h"
+ 
+ 
+ struct pj_opaque {
+--- a/src/PJ_bipc.c
++++ b/src/PJ_bipc.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include <errno.h>
+ #include "projects.h"
+ 
+--- a/src/PJ_boggs.c
++++ b/src/PJ_boggs.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ # include	<errno.h>
+-# include	<projects.h>
++# include	"projects.h"
+ PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph.";
+ # define NITER	20
+ # define EPS	1e-7
+--- a/src/PJ_bonne.c
++++ b/src/PJ_bonne.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)")
+--- a/src/PJ_calcofi.c
++++ b/src/PJ_calcofi.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(calcofi,
+@@ -8,7 +8,7 @@ PROJ_HEAD(calcofi,
+ #include <string.h>
+ #include <stdio.h>
+ #include <math.h>
+-#include <proj_api.h>
++#include "proj_api.h"
+ #include <errno.h>
+ 
+ /* Conversions for the California Cooperative Oceanic Fisheries Investigations
+--- a/src/PJ_cc.c
++++ b/src/PJ_cc.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(cc, "Central Cylindrical") "\n\tCyl, Sph";
+--- a/src/PJ_ccon.c
++++ b/src/PJ_ccon.c
+@@ -22,7 +22,7 @@
+ 
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ #define EPS10   1e-10
+--- a/src/PJ_cea.c
++++ b/src/PJ_cea.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ struct pj_opaque {
+--- a/src/PJ_chamb.c
++++ b/src/PJ_chamb.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ typedef struct { double r, Az; } VECT;
+--- a/src/PJ_collg.c
++++ b/src/PJ_collg.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(collg, "Collignon") "\n\tPCyl, Sph.";
+--- a/src/PJ_comill.c
++++ b/src/PJ_comill.c
+@@ -7,7 +7,7 @@ Port to PROJ.4 by Bojan Savric, 4 April
+ */
+ 
+ #define PJ_LIB__
+-#include    <projects.h>
++#include    "projects.h"
+ 
+ PROJ_HEAD(comill, "Compact Miller") "\n\tCyl., Sph.";
+ 
+--- a/src/PJ_crast.c
++++ b/src/PJ_crast.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-# include   <projects.h>
++# include   "projects.h"
+ 
+ PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)") "\n\tPCyl., Sph.";
+ 
+--- a/src/PJ_deformation.c
++++ b/src/PJ_deformation.c
+@@ -53,7 +53,7 @@ grid-values in units of mm/year in ENU-s
+ ***********************************************************************/
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+--- a/src/PJ_denoy.c
++++ b/src/PJ_denoy.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include    <projects.h>
++#include    "projects.h"
+ 
+ PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") "\n\tPCyl., no inv., Sph.";
+ 
+--- a/src/PJ_eck2.c
++++ b/src/PJ_eck2.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(eck2, "Eckert II") "\n\tPCyl. Sph.";
+--- a/src/PJ_eck4.c
++++ b/src/PJ_eck4.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include    <projects.h>
++#include    "projects.h"
+ 
+ PROJ_HEAD(eck4, "Eckert IV") "\n\tPCyl, Sph.";
+ 
+--- a/src/PJ_eqc.c
++++ b/src/PJ_eqc.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ struct pj_opaque {
+--- a/src/PJ_eqdc.c
++++ b/src/PJ_eqdc.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ struct pj_opaque {
+--- a/src/PJ_fahey.c
++++ b/src/PJ_fahey.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ 
+ PROJ_HEAD(fahey, "Fahey") "\n\tPcyl, Sph.";
+ 
+--- a/src/PJ_fouc_s.c
++++ b/src/PJ_fouc_s.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") "\n\tPCyl., Sph.";
+--- a/src/PJ_gall.c
++++ b/src/PJ_gall.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ 
+ PROJ_HEAD(gall, "Gall (Gall Stereographic)") "\n\tCyl, Sph";
+ 
+--- a/src/PJ_geoc.c
++++ b/src/PJ_geoc.c
+@@ -27,7 +27,7 @@
+  *****************************************************************************/
+ 
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include <errno.h>
+ #include "projects.h"
+ 
+--- a/src/PJ_geos.c
++++ b/src/PJ_geos.c
+@@ -29,7 +29,7 @@
+ 
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ struct pj_opaque {
+--- a/src/PJ_gn_sinu.c
++++ b/src/PJ_gn_sinu.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(gn_sinu, "General Sinusoidal Series") "\n\tPCyl, Sph.\n\tm= n=";
+--- a/src/PJ_gnom.c
++++ b/src/PJ_gnom.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph.";
+--- a/src/PJ_goode.c
++++ b/src/PJ_goode.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(goode, "Goode Homolosine") "\n\tPCyl, Sph.";
+--- a/src/PJ_hammer.c
++++ b/src/PJ_hammer.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
+--- a/src/PJ_hatano.c
++++ b/src/PJ_hatano.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph.";
+--- a/src/PJ_healpix.c
++++ b/src/PJ_healpix.c
+@@ -31,7 +31,7 @@
+ # define PJ_LIB__
+ # include <errno.h>
+ # include "proj_internal.h"
+-# include <proj.h>
++# include "proj.h"
+ # include "projects.h"
+ 
+ PROJ_HEAD(healpix, "HEALPix") "\n\tSph., Ellps.";
+--- a/src/PJ_imw_p.c
++++ b/src/PJ_imw_p.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(imw_p, "International Map of the World Polyconic")
+--- a/src/PJ_isea.c
++++ b/src/PJ_isea.c
+@@ -1027,7 +1027,7 @@ isea_forward(struct isea_dgg *g, struct
+ 
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(isea, "Icosahedral Snyder Equal Area") "\n\tSph";
+--- a/src/PJ_laea.c
++++ b/src/PJ_laea.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(laea, "Lambert Azimuthal Equal Area") "\n\tAzi, Sph&Ell";
+--- a/src/PJ_lagrng.c
++++ b/src/PJ_lagrng.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(lagrng, "Lagrange") "\n\tMisc Sph, no inv.\n\tW=";
+--- a/src/PJ_lcc.c
++++ b/src/PJ_lcc.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(lcc, "Lambert Conformal Conic")
+--- a/src/PJ_lcca.c
++++ b/src/PJ_lcca.c
+@@ -47,7 +47,7 @@
+ 
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative")
+--- a/src/PJ_loxim.c
++++ b/src/PJ_loxim.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(loxim, "Loximuthal") "\n\tPCyl Sph";
+--- a/src/PJ_lsat.c
++++ b/src/PJ_lsat.c
+@@ -1,7 +1,7 @@
+ /* based upon Snyder and Linck, USGS-NMD */
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(lsat, "Space oblique for LANDSAT")
+--- a/src/PJ_mbtfpp.c
++++ b/src/PJ_mbtfpp.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") "\n\tCyl., Sph.";
+--- a/src/PJ_mbtfpq.c
++++ b/src/PJ_mbtfpq.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") "\n\tCyl., Sph.";
+--- a/src/PJ_merc.c
++++ b/src/PJ_merc.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(merc, "Mercator") "\n\tCyl, Sph&Ell\n\tlat_ts=";
+--- a/src/PJ_misrsom.c
++++ b/src/PJ_misrsom.c
+@@ -22,7 +22,7 @@
+ /* based upon Snyder and Linck, USGS-NMD */
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(misrsom, "Space oblique for MISR")
+--- a/src/PJ_molodensky.c
++++ b/src/PJ_molodensky.c
+@@ -44,7 +44,7 @@
+ ***********************************************************************/
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+--- a/src/PJ_nsper.c
++++ b/src/PJ_nsper.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ enum Mode {
+--- a/src/PJ_ob_tran.c
++++ b/src/PJ_ob_tran.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ #include <string.h>
+ 
+--- a/src/PJ_ocea.c
++++ b/src/PJ_ocea.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ 
+ PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area") "\n\tCyl, Sph"
+     "lonc= alpha= or\n\tlat_1= lat_2= lon_1= lon_2=";
+--- a/src/PJ_oea.c
++++ b/src/PJ_oea.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(oea, "Oblated Equal Area") "\n\tMisc Sph\n\tn= m= theta=";
+--- a/src/PJ_omerc.c
++++ b/src/PJ_omerc.c
+@@ -23,7 +23,7 @@
+ */
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(omerc, "Oblique Mercator")
+--- a/src/PJ_ortho.c
++++ b/src/PJ_ortho.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph.";
+--- a/src/PJ_patterson.c
++++ b/src/PJ_patterson.c
+@@ -39,7 +39,7 @@
+  */
+ 
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ 
+ PROJ_HEAD(patterson, "Patterson Cylindrical") "\n\tCyl.";
+ 
+--- a/src/PJ_pipeline.c
++++ b/src/PJ_pipeline.c
+@@ -95,8 +95,8 @@ Thomas Knudsen, thokn at sdfe.dk, 2016-05-2
+ ********************************************************************************/
+ 
+ #define PJ_LIB__
+-#include <geodesic.h>
+-#include <proj.h>
++#include "geodesic.h"
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+--- a/src/PJ_poly.c
++++ b/src/PJ_poly.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(poly, "Polyconic (American)")
+--- a/src/PJ_putp3.c
++++ b/src/PJ_putp3.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ 
+ struct pj_opaque {
+     double  A;
+--- a/src/PJ_putp6.c
++++ b/src/PJ_putp6.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ 
+ struct pj_opaque {
+     double C_x, C_y, A, B, D;
+--- a/src/PJ_robin.c
++++ b/src/PJ_robin.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(robin, "Robinson") "\n\tPCyl., Sph.";
+--- a/src/PJ_sch.c
++++ b/src/PJ_sch.c
+@@ -32,7 +32,7 @@
+ 
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ #include "geocent.h"
+ 
+--- a/src/PJ_sconics.c
++++ b/src/PJ_sconics.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ 
+--- a/src/PJ_somerc.c
++++ b/src/PJ_somerc.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(somerc, "Swiss. Obl. Mercator") "\n\tCyl, Ell\n\tFor CH1903";
+--- a/src/PJ_stere.c
++++ b/src/PJ_stere.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(stere, "Stereographic") "\n\tAzi, Sph&Ell\n\tlat_ts=";
+--- a/src/PJ_sterea.c
++++ b/src/PJ_sterea.c
+@@ -25,7 +25,7 @@
+ */
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ 
+ 
+ struct pj_opaque {
+--- a/src/PJ_tcc.c
++++ b/src/PJ_tcc.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv.";
+--- a/src/PJ_times.c
++++ b/src/PJ_times.c
+@@ -30,7 +30,7 @@
+  *****************************************************************************/
+ 
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ 
+ PROJ_HEAD(times, "Times") "\n\tCyl, Sph";
+ 
+--- a/src/PJ_tmerc.c
++++ b/src/PJ_tmerc.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(tmerc, "Transverse Mercator") "\n\tCyl, Sph&Ell";
+--- a/src/PJ_tpeqd.c
++++ b/src/PJ_tpeqd.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ 
+--- a/src/PJ_urm5.c
++++ b/src/PJ_urm5.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph., no inv.\n\tn= q= alpha=";
+--- a/src/PJ_urmfps.c
++++ b/src/PJ_urmfps.c
+@@ -1,6 +1,6 @@
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal") "\n\tPCyl, Sph.\n\tn=";
+--- a/src/PJ_vandg.c
++++ b/src/PJ_vandg.c
+@@ -1,5 +1,5 @@
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ PROJ_HEAD(vandg, "van der Grinten (I)") "\n\tMisc Sph";
+--- a/src/aasincos.c
++++ b/src/aasincos.c
+@@ -1,5 +1,5 @@
+ /* arc sin, cosine, tan2 and sqrt that will NOT fail */
+-#include <projects.h>
++#include "projects.h"
+ #define ONE_TOL	 1.00000000000001
+ #define ATOL 1e-50
+ 
+--- a/src/bch2bps.c
++++ b/src/bch2bps.c
+@@ -1,5 +1,5 @@
+ /* convert bivariate w Chebyshev series to w Power series */
+-#include <projects.h>
++#include "projects.h"
+ /* basic support procedures */
+ 	static void /* clear vector to zero */
+ clear(projUV *p, int n) { static const projUV c = {0., 0.}; while (n--) *p++ = c; }
+--- a/src/bchgen.c
++++ b/src/bchgen.c
+@@ -1,5 +1,5 @@
+ /* generate double bivariate Chebychev polynomial */
+-#include <projects.h>
++#include "projects.h"
+ 	int
+ bchgen(projUV a, projUV b, int nu, int nv, projUV **f, projUV(*func)(projUV)) {
+ 	int i, j, k;
+--- a/src/biveval.c
++++ b/src/biveval.c
+@@ -1,5 +1,5 @@
+ /* procedures for evaluating Tseries */
+-# include <projects.h>
++# include "projects.h"
+ # define NEAR_ONE	1.00001
+ static double ceval(struct PW_COEF *C, int n, projUV w, projUV w2) {
+     double d=0, dd=0, vd, vdd, tmp, *c;
+--- a/src/cct.c
++++ b/src/cct.c
+@@ -77,7 +77,7 @@ Thomas Knudsen, thokn at sdfe.dk, 2016-05-2
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#include <proj.h>
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ #include "optargpm.h"
+--- a/src/dmstor.c
++++ b/src/dmstor.c
+@@ -1,5 +1,5 @@
+ /* Convert DMS string to radians */
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ #include <ctype.h>
+ 
+--- a/src/emess.c
++++ b/src/emess.c
+@@ -14,7 +14,7 @@
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <string.h>
+-#include <proj_api.h>
++#include "proj_api.h"
+ #define EMESS_ROUTINE
+ #include "emess.h"
+ 	void
+--- a/src/gie.c
++++ b/src/gie.c
+@@ -112,7 +112,7 @@ Thomas Knudsen, thokn at sdfe.dk, 2017-10-0
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#include <proj.h>
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+--- a/src/mk_cheby.c
++++ b/src/mk_cheby.c
+@@ -1,4 +1,4 @@
+-#include <projects.h>
++#include "projects.h"
+ static void /* sum coefficients less than res */
+ eval(projUV **w, int nu, int nv, double res, projUV *resid) {
+     int i, j;
+--- a/src/nad_init.c
++++ b/src/nad_init.c
+@@ -27,7 +27,7 @@
+ 
+ #define PJ_LIB__
+ 
+-#include <projects.h>
++#include "projects.h"
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
+--- a/src/nad_intr.c
++++ b/src/nad_intr.c
+@@ -1,6 +1,6 @@
+ /* Determine nad table correction value */
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ 	LP
+ nad_intr(LP t, struct CTABLE *ct) {
+ 	LP val, frct;
+--- a/src/pj_auth.c
++++ b/src/pj_auth.c
+@@ -1,5 +1,5 @@
+ /* determine latitude from authalic latitude */
+-#include <projects.h>
++#include "projects.h"
+ # define P00 .33333333333333333333 /*   1 /     3 */
+ # define P01 .17222222222222222222 /*  31 /   180 */
+ # define P02 .10257936507936507937 /* 517 /  5040 */
+--- a/src/pj_ctx.c
++++ b/src/pj_ctx.c
+@@ -25,7 +25,7 @@
+  * DEALINGS IN THE SOFTWARE.
+  *****************************************************************************/
+ 
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ #include <errno.h>
+ 
+--- a/src/pj_datum_set.c
++++ b/src/pj_datum_set.c
+@@ -26,7 +26,7 @@
+  *****************************************************************************/
+ 
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ 
+ /* SEC_TO_RAD = Pi/180/3600 */
+--- a/src/pj_datums.c
++++ b/src/pj_datums.c
+@@ -28,7 +28,7 @@
+ #include "proj.h"
+ 
+ #define PJ_DATUMS__
+-#include <projects.h>
++#include "projects.h"
+ 
+ /*
+  * The ellipse code must match one from pj_ellps.c.  The datum id should
+--- a/src/pj_ell_set.c
++++ b/src/pj_ell_set.c
+@@ -1,7 +1,7 @@
+ /* set ellipsoid parameters a and es */
+ #include <string.h>
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+--- a/src/pj_errno.c
++++ b/src/pj_errno.c
+@@ -1,6 +1,6 @@
+ /* For full ANSI compliance of global variable */
+ 
+-#include <projects.h>
++#include "projects.h"
+ 
+ C_NAMESPACE_VAR int pj_errno = 0;
+ 
+--- a/src/pj_factors.c
++++ b/src/pj_factors.c
+@@ -1,6 +1,6 @@
+ /* projection scale factors */
+ #define PJ_LIB__
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ #include <errno.h>
+--- a/src/pj_fileapi.c
++++ b/src/pj_fileapi.c
+@@ -27,7 +27,7 @@
+  *****************************************************************************/
+ 
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ 
+ static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, 
+--- a/src/pj_gauss.c
++++ b/src/pj_gauss.c
+@@ -24,7 +24,7 @@
+ ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ 
+ #define MAX_ITER 20
+ 
+--- a/src/pj_gc_reader.c
++++ b/src/pj_gc_reader.c
+@@ -28,7 +28,7 @@
+ #define PJ_LIB__
+ 
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ #include <ctype.h>
+ 
+--- a/src/pj_geocent.c
++++ b/src/pj_geocent.c
+@@ -28,7 +28,7 @@
+  *****************************************************************************/
+ 
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ 
+ PROJ_HEAD(geocent, "Geocentric")  "\n\t";
+ 
+--- a/src/pj_gridcatalog.c
++++ b/src/pj_gridcatalog.c
+@@ -27,7 +27,7 @@
+ 
+ #define PJ_LIB__
+ 
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ #include <assert.h>
+ 
+--- a/src/pj_gridlist.c
++++ b/src/pj_gridlist.c
+@@ -29,7 +29,7 @@
+ #define PJ_LIB__
+ 
+ #include <errno.h>
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ #include <math.h>
+ 
+--- a/src/pj_init.c
++++ b/src/pj_init.c
+@@ -30,12 +30,12 @@
+ 
+ 
+ #define PJ_LIB__
+-#include <geodesic.h>
++#include "geodesic.h"
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <ctype.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+--- a/src/pj_initcache.c
++++ b/src/pj_initcache.c
+@@ -25,7 +25,7 @@
+  * DEALINGS IN THE SOFTWARE.
+  *****************************************************************************/
+ 
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ 
+ static int cache_count = 0;
+--- a/src/pj_internal.c
++++ b/src/pj_internal.c
+@@ -33,7 +33,7 @@
+ #include <stdarg.h>
+ #include <errno.h>
+ 
+-#include <geodesic.h>
++#include "geodesic.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+--- a/src/pj_log.c
++++ b/src/pj_log.c
+@@ -26,7 +26,7 @@
+  *****************************************************************************/
+ 
+ #include "proj.h"
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ #include <stdarg.h>
+ 
+--- a/src/pj_malloc.c
++++ b/src/pj_malloc.c
+@@ -40,7 +40,7 @@
+ ** projection system memory allocation/deallocation call with custom
+ ** application procedures.  */
+ 
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ #include <errno.h>
+ 
+--- a/src/pj_mlfn.c
++++ b/src/pj_mlfn.c
+@@ -1,4 +1,4 @@
+-#include <projects.h>
++#include "projects.h"
+ /* meridional distance for ellipsoid and inverse
+ **	8th degree - accurate to < 1e-5 meters when used in conjunction
+ **		with typical major axis values.
+--- a/src/pj_msfn.c
++++ b/src/pj_msfn.c
+@@ -1,6 +1,6 @@
+ /* determine constant small m */
+ #include <math.h>
+-#include <projects.h>
++#include "projects.h"
+ 	double
+ pj_msfn(double sinphi, double cosphi, double es) {
+ 	return (cosphi / sqrt (1. - es * sinphi * sinphi));
+--- a/src/pj_mutex.c
++++ b/src/pj_mutex.c
+@@ -36,9 +36,9 @@
+ 
+ #ifndef _WIN32
+ #include "proj_config.h"
+-#include <projects.h>
++#include "projects.h"
+ #else
+-#include <proj_api.h>
++#include "proj_api.h"
+ #endif
+ 
+ /* on win32 we always use win32 mutexes, even if pthreads are available */
+--- a/src/pj_open_lib.c
++++ b/src/pj_open_lib.c
+@@ -30,7 +30,7 @@
+ 
+ #define PJ_LIB__
+ #include "proj_internal.h"
+-#include <projects.h>
++#include "projects.h"
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+--- a/src/pj_phi2.c
++++ b/src/pj_phi2.c
+@@ -1,5 +1,5 @@
+ /* determine latitude angle phi-2 */
+-#include <projects.h>
++#include "projects.h"
+ 
+ #define TOL 1.0e-10
+ #define N_ITER 15
+--- a/src/pj_pr_list.c
++++ b/src/pj_pr_list.c
+@@ -1,5 +1,5 @@
+ /* print projection's list of parameters */
+-#include <projects.h>
++#include "projects.h"
+ #include <stdio.h>
+ #include <string.h>
+ #define LINE_LEN 72
+--- a/src/pj_qsfn.c
++++ b/src/pj_qsfn.c
+@@ -1,6 +1,6 @@
+ /* determine small q */
+ #include <math.h>
+-#include <projects.h>
++#include "projects.h"
+ 
+ # define EPSILON 1.0e-7
+ 
+--- a/src/pj_release.c
++++ b/src/pj_release.c
+@@ -1,6 +1,6 @@
+ /* <<< Release Notice for library >>> */
+ 
+-#include <projects.h>
++#include "projects.h"
+ 
+ char const pj_release[]="Rel. 5.0.0, March 1st, 2018";
+ 
+--- a/src/pj_tsfn.c
++++ b/src/pj_tsfn.c
+@@ -1,6 +1,6 @@
+ /* determine small t */
+ #include <math.h>
+-#include <projects.h>
++#include "projects.h"
+ 
+ double pj_tsfn(double phi, double sinphi, double e) {
+     double denominator;
+--- a/src/pj_units.c
++++ b/src/pj_units.c
+@@ -3,7 +3,7 @@
+ #include "proj.h"
+ 
+ #define PJ_UNITS__
+-#include <projects.h>
++#include "projects.h"
+ 
+ /* Field 2 that contains the multiplier to convert named units to meters
+ ** may be expressed by either a simple floating point constant or a
+--- a/src/pj_utils.c
++++ b/src/pj_utils.c
+@@ -28,7 +28,7 @@
+ 
+ #define PJ_LIB__
+ 
+-#include <projects.h>
++#include "projects.h"
+ #include <string.h>
+ #include <math.h>
+ 
+--- a/src/pj_zpoly1.c
++++ b/src/pj_zpoly1.c
+@@ -1,5 +1,5 @@
+ /* evaluate complex polynomial */
+-#include <projects.h>
++#include "projects.h"
+ /* note: coefficients are always from C_1 to C_n
+ **	i.e. C_0 == (0., 0)
+ **	n should always be >= 1 though no checks are made
+--- a/src/proj_4D_api.c
++++ b/src/proj_4D_api.c
+@@ -28,7 +28,7 @@
+  *****************************************************************************/
+ #include <stddef.h>
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "proj_internal.h"
+ #include "projects.h"
+ #include "geodesic.h"
+--- a/src/proj_etmerc.c
++++ b/src/proj_etmerc.c
+@@ -42,7 +42,7 @@
+ #define PJ_LIB__
+ 
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ 
+--- a/src/proj_mdist.c
++++ b/src/proj_mdist.c
+@@ -28,7 +28,7 @@
+ ** Precision commensurate with double precision.
+ */
+ #define PJ_LIB__
+-#include <projects.h>
++#include "projects.h"
+ #define MAX_ITER 20
+ #define TOL 1e-14
+ 
+--- a/src/proj_rouss.c
++++ b/src/proj_rouss.c
+@@ -25,7 +25,7 @@
+ */
+ #define PJ_LIB__
+ #include <errno.h>
+-#include <proj.h>
++#include "proj.h"
+ #include "projects.h"
+ 
+ struct pj_opaque {
+--- a/src/rtodms.c
++++ b/src/rtodms.c
+@@ -1,5 +1,5 @@
+ /* Convert radian argument to DMS ascii format */
+-#include <projects.h>
++#include "projects.h"
+ #include <stdio.h>
+ #include <string.h>
+ /*
+--- a/src/test228.c
++++ b/src/test228.c
+@@ -1,4 +1,4 @@
+-#include <proj_api.h>
++#include "proj_api.h"
+ #include <stdio.h> /* for printf declaration */
+ 
+ 
+--- a/src/vector1.c
++++ b/src/vector1.c
+@@ -1,6 +1,6 @@
+ /* make storage for one and two dimensional matricies */
+ #include <stdlib.h>
+-#include <projects.h>
++#include "projects.h"
+ 	void * /* one dimension array */
+ vector1(int nvals, int size) { return((void *)pj_malloc(size * nvals)); }
+ 	void /* free 2D array */
diff --git a/debian/patches/Remove-pj_-prefix-from-static-functions.patch b/debian/patches/Remove-pj_-prefix-from-static-functions.patch
new file mode 100644
index 0000000..a2d605a
--- /dev/null
+++ b/debian/patches/Remove-pj_-prefix-from-static-functions.patch
@@ -0,0 +1,652 @@
+Description: Remove 'pj_' prefix from static functions
+ Functions should only be prefixed with 'pj_' when they can be used in
+ other parts of the code base and not just within a single file.
+ .
+ Takes care of the last step in #675.
+Author: Kristian Evers <kristianevers at gmail.com>
+Origin: https://github.com/OSGeo/proj.4/commit/9312b5c1470147660f0dde97bb4007c826bcd1cd
+
+--- a/src/PJ_healpix.c
++++ b/src/PJ_healpix.c
+@@ -71,7 +71,7 @@ static const double rot[7][2][2] = ROT;
+  * @param v the parameter whose sign is returned.
+  * @return 1 for positive number, -1 for negative, and 0 for zero.
+  **/
+-static double pj_sign (double v) {
++static double sign (double v) {
+     return v > 0 ? 1 : (v < 0 ? -1 : 0);
+ }
+ 
+@@ -236,7 +236,7 @@ static double auth_lat(PJ *P, double alp
+ 
+         if (fabs(ratio) > 1) {
+             /* Rounding error. */
+-            ratio = pj_sign(ratio);
++            ratio = sign(ratio);
+         }
+         return asin(ratio);
+     } else {
+@@ -269,7 +269,7 @@ static XY healpix_sphere(LP lp) {
+         }
+         lamc = -3*M_FORTPI + M_HALFPI*cn;
+         xy.x = lamc + (lam - lamc)*sigma;
+-        xy.y = pj_sign(phi)*M_FORTPI*(2 - sigma);
++        xy.y = sign(phi)*M_FORTPI*(2 - sigma);
+     }
+     return xy;
+ }
+@@ -297,10 +297,10 @@ static LP healpix_sphere_inverse(XY xy)
+         xc = -3*M_FORTPI + M_HALFPI*cn;
+         tau = 2.0 - 4*fabs(y)/M_PI;
+         lp.lam = xc + (x - xc)/tau;
+-        lp.phi = pj_sign(y)*asin(1.0 - pow(tau, 2)/3.0);
++        lp.phi = sign(y)*asin(1.0 - pow(tau, 2)/3.0);
+     } else {
+         lp.lam = -M_PI;
+-        lp.phi = pj_sign(y)*M_HALFPI;
++        lp.phi = sign(y)*M_HALFPI;
+     }
+     return (lp);
+ }
+--- a/src/gie.c
++++ b/src/gie.c
+@@ -579,9 +579,9 @@ either a conversion or a transformation)
+ 
+ 
+ 
+-static int pj_unitconvert_selftest (void);
+-static int pj_cart_selftest (void);
+-static int pj_horner_selftest (void);
++static int unitconvert_selftest (void);
++static int cart_selftest (void);
++static int horner_selftest (void);
+ 
+ /*****************************************************************************/
+ static int builtins (const char *args) {
+@@ -598,26 +598,26 @@ using the "builtins" command verb.
+     T.op_ok = 0;
+     T.op_ko = 0;
+     T.op_skip = 0;
+-    i = pj_unitconvert_selftest ();
++    i = unitconvert_selftest ();
+     if (i!=0) {
+-        fprintf (T.fout, "pj_unitconvert_selftest fails with %d\n", i);
++        fprintf (T.fout, "unitconvert_selftest fails with %d\n", i);
+         another_failing_builtin();
+     }
+     else
+         another_succeeding_builtin ();
+ 
+ 
+-    i = pj_cart_selftest ();
++    i = cart_selftest ();
+     if (i!=0) {
+-        fprintf (T.fout, "pj_cart_selftest fails with %d\n", i);
++        fprintf (T.fout, "cart_selftest fails with %d\n", i);
+         another_failing_builtin();
+     }
+     else
+         another_succeeding_builtin ();
+ 
+-    i = pj_horner_selftest ();
++    i = horner_selftest ();
+     if (i!=0) {
+-        fprintf (T.fout, "pj_horner_selftest fails with %d\n", i);
++        fprintf (T.fout, "horner_selftest fails with %d\n", i);
+         another_failing_builtin();
+     }
+     else
+@@ -1473,7 +1473,7 @@ static const char sb_utm32[] = {
+     " +inv_c=6.13342118787027e+06,4.94690181709311e+05,9.99824464710368e-01,2.82279070814774e-02,7.66123542220864e-11,1.78425334628927e-09,-1.05584823306400e-14,-3.32554258683744e-15"
+ };
+ 
+-static int pj_horner_selftest (void) {
++static int horner_selftest (void) {
+     PJ *P;
+     PJ_COORD a, b, c;
+     double dist;
+@@ -1539,7 +1539,7 @@ static int pj_horner_selftest (void) {
+ 
+ 
+ /* Testing quite a bit of the pj_obs_api as a side effect (inspired by pj_obs_api_test.c) */
+-static int pj_cart_selftest (void) {
++static int cart_selftest (void) {
+     PJ_CONTEXT *ctx;
+     PJ *P;
+     PJ_COORD a, b, obs[2];
+@@ -1968,7 +1968,7 @@ static int test_time(const char* args, d
+     return ret;
+ }
+ 
+-static int pj_unitconvert_selftest (void) {
++static int unitconvert_selftest (void) {
+     int ret = 0;
+     char args1[] = "+proj=unitconvert +t_in=decimalyear +t_out=decimalyear";
+     double in1 = 2004.25;
+--- a/src/pj_apply_vgridshift.c
++++ b/src/pj_apply_vgridshift.c
+@@ -33,7 +33,7 @@
+ #include "proj_internal.h"
+ #include "projects.h"
+ 
+-static double pj_read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) {
++static double read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) {
+     int  itable = 0;
+     double value = HUGE_VAL;
+     double grid_x, grid_y;
+@@ -180,7 +180,7 @@ int pj_apply_vgridshift( PJ *defn, const
+         input.phi = y[io];
+         input.lam = x[io];
+ 
+-        value = pj_read_vgrid_value(defn, input, gridlist_count_p, tables, &ct);
++        value = read_vgrid_value(defn, input, gridlist_count_p, tables, &ct);
+ 
+         if( inverse )
+             z[io] -= value;
+@@ -286,7 +286,7 @@ double proj_vgrid_value(PJ *P, LP lp){
+     double value;
+     memset(&used_grid, 0, sizeof(struct CTABLE));
+ 
+-    value = pj_read_vgrid_value(P, lp, &(P->vgridlist_geoid_count), P->vgridlist_geoid, &used_grid);
++    value = read_vgrid_value(P, lp, &(P->vgridlist_geoid_count), P->vgridlist_geoid, &used_grid);
+     proj_log_trace(P, "proj_vgrid_value: (%f, %f) = %f", lp.lam*RAD_TO_DEG, lp.phi*RAD_TO_DEG, value);
+ 
+     return value;
+--- a/src/pj_fileapi.c
++++ b/src/pj_fileapi.c
+@@ -30,20 +30,20 @@
+ #include "projects.h"
+ #include <string.h>
+ 
+-static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, 
++static PAFile stdio_fopen(projCtx ctx, const char *filename, 
+                              const char *access);
+-static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb, 
++static size_t stdio_fread(void *buffer, size_t size, size_t nmemb, 
+                              PAFile file);
+-static int pj_stdio_fseek(PAFile file, long offset, int whence);
+-static long pj_stdio_ftell(PAFile file);
+-static void pj_stdio_fclose(PAFile file);
++static int stdio_fseek(PAFile file, long offset, int whence);
++static long stdio_ftell(PAFile file);
++static void stdio_fclose(PAFile file);
+ 
+ static projFileAPI default_fileapi = { 
+-    pj_stdio_fopen, 
+-    pj_stdio_fread,
+-    pj_stdio_fseek,
+-    pj_stdio_ftell,
+-    pj_stdio_fclose
++    stdio_fopen, 
++    stdio_fread,
++    stdio_fseek,
++    stdio_ftell,
++    stdio_fclose
+ };
+ 
+ typedef struct {
+@@ -61,10 +61,10 @@ projFileAPI *pj_get_default_fileapi(void
+ }
+ 
+ /************************************************************************/
+-/*                           pj_stdio_fopen()                           */
++/*                           stdio_fopen()                           */
+ /************************************************************************/
+ 
+-static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, 
++static PAFile stdio_fopen(projCtx ctx, const char *filename, 
+                              const char *access)
+ {
+     stdio_pafile *pafile;
+@@ -90,10 +90,10 @@ static PAFile pj_stdio_fopen(projCtx ctx
+ }
+ 
+ /************************************************************************/
+-/*                           pj_stdio_fread()                           */
++/*                           stdio_fread()                           */
+ /************************************************************************/
+ 
+-static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb, 
++static size_t stdio_fread(void *buffer, size_t size, size_t nmemb, 
+                              PAFile file)
+ {
+     stdio_pafile *pafile = (stdio_pafile *) file;
+@@ -101,27 +101,27 @@ static size_t pj_stdio_fread(void *buffe
+ }
+ 
+ /************************************************************************/
+-/*                           pj_stdio_fseek()                           */
++/*                           stdio_fseek()                           */
+ /************************************************************************/
+-static int pj_stdio_fseek(PAFile file, long offset, int whence)
++static int stdio_fseek(PAFile file, long offset, int whence)
+ {
+     stdio_pafile *pafile = (stdio_pafile *) file;
+     return fseek(pafile->fp, offset, whence);
+ }
+ 
+ /************************************************************************/
+-/*                           pj_stdio_ftell()                           */
++/*                           stdio_ftell()                           */
+ /************************************************************************/
+-static long pj_stdio_ftell(PAFile file)
++static long stdio_ftell(PAFile file)
+ {
+     stdio_pafile *pafile = (stdio_pafile *) file;
+     return ftell(pafile->fp);
+ }
+ 
+ /************************************************************************/
+-/*                          pj_stdio_fclose()                           */
++/*                          stdio_fclose()                           */
+ /************************************************************************/
+-static void pj_stdio_fclose(PAFile file)
++static void stdio_fclose(PAFile file)
+ {
+     stdio_pafile *pafile = (stdio_pafile *) file;
+     fclose(pafile->fp);
+--- a/src/pj_fwd.c
++++ b/src/pj_fwd.c
+@@ -36,7 +36,7 @@
+ #define OUTPUT_UNITS P->right
+ 
+ 
+-static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) {
++static PJ_COORD fwd_prepare (PJ *P, PJ_COORD coo) {
+     if (HUGE_VAL==coo.v[0])
+         return proj_coord_error ();
+ 
+@@ -100,7 +100,7 @@ static PJ_COORD pj_fwd_prepare (PJ *P, P
+ 
+ 
+ 
+-static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) {
++static PJ_COORD fwd_finalize (PJ *P, PJ_COORD coo) {
+ 
+     switch (OUTPUT_UNITS) {
+ 
+@@ -180,7 +180,7 @@ XY pj_fwd(LP lp, PJ *P) {
+     coo.lp = lp;
+ 
+     if (!P->skip_fwd_prepare)
+-        coo = pj_fwd_prepare (P, coo);
++        coo = fwd_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+         return proj_coord_error ().xy;
+ 
+@@ -199,7 +199,7 @@ XY pj_fwd(LP lp, PJ *P) {
+         return proj_coord_error ().xy;
+ 
+     if (!P->skip_fwd_finalize)
+-        coo = pj_fwd_finalize (P, coo);
++        coo = fwd_finalize (P, coo);
+     return coo.xy;
+ }
+ 
+@@ -210,7 +210,7 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
+     coo.lpz = lpz;
+ 
+     if (!P->skip_fwd_prepare)
+-        coo = pj_fwd_prepare (P, coo);
++        coo = fwd_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+         return proj_coord_error ().xyz;
+ 
+@@ -229,7 +229,7 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
+         return proj_coord_error ().xyz;
+ 
+     if (!P->skip_fwd_finalize)
+-        coo = pj_fwd_finalize (P, coo);
++        coo = fwd_finalize (P, coo);
+     return coo.xyz;
+ }
+ 
+@@ -237,7 +237,7 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
+ 
+ PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P) {
+     if (!P->skip_fwd_prepare)
+-        coo = pj_fwd_prepare (P, coo);
++        coo = fwd_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+         return proj_coord_error ();
+ 
+@@ -256,6 +256,6 @@ PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P)
+         return proj_coord_error ();
+ 
+     if (!P->skip_fwd_finalize)
+-        coo = pj_fwd_finalize (P, coo);
++        coo = fwd_finalize (P, coo);
+     return coo;
+ }
+--- a/src/pj_gc_reader.c
++++ b/src/pj_gc_reader.c
+@@ -32,7 +32,7 @@
+ #include <string.h>
+ #include <ctype.h>
+ 
+-static int pj_gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry);
++static int gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry);
+ 
+ /************************************************************************/
+ /*                         pj_gc_readcatalog()                          */
+@@ -81,7 +81,7 @@ PJ_GridCatalog *pj_gc_readcatalog( projC
+         return NULL;
+     }
+     
+-    while( pj_gc_readentry( ctx, fid, 
++    while( gc_readentry( ctx, fid, 
+                             catalog->entries+catalog->entry_count) == 0)
+     {
+         catalog->entry_count++;
+@@ -114,13 +114,13 @@ PJ_GridCatalog *pj_gc_readcatalog( projC
+ }
+ 
+ /************************************************************************/
+-/*                        pj_gc_read_csv_line()                         */
++/*                        gc_read_csv_line()                         */
+ /*                                                                      */
+ /*      Simple csv line splitter with fixed maximum line size and       */
+ /*      token count.                                                    */
+ /************************************************************************/
+ 
+-static int pj_gc_read_csv_line( projCtx ctx, PAFile fid, 
++static int gc_read_csv_line( projCtx ctx, PAFile fid, 
+                                 char **tokens, int max_tokens ) 
+ {
+     char line[302];
+@@ -197,7 +197,7 @@ double pj_gc_parsedate( projCtx ctx, con
+ 
+ 
+ /************************************************************************/
+-/*                          pj_gc_readentry()                           */
++/*                          gc_readentry()                           */
+ /*                                                                      */
+ /*      Read one catalog entry from the file                            */
+ /*                                                                      */
+@@ -205,7 +205,7 @@ double pj_gc_parsedate( projCtx ctx, con
+ /*        gridname,ll_long,ll_lat,ur_long,ur_lat,priority,date          */
+ /************************************************************************/
+ 
+-static int pj_gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry) 
++static int gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry) 
+ {
+ #define MAX_TOKENS 30
+     char *tokens[MAX_TOKENS];
+@@ -214,7 +214,7 @@ static int pj_gc_readentry(projCtx ctx,
+ 
+     memset( entry, 0, sizeof(PJ_GridCatalogEntry) );
+     
+-    token_count = pj_gc_read_csv_line( ctx, fid, tokens, MAX_TOKENS );
++    token_count = gc_read_csv_line( ctx, fid, tokens, MAX_TOKENS );
+     if( token_count < 5 )
+     {
+         error = 1; /* TODO: need real error codes */
+--- a/src/pj_gridinfo.c
++++ b/src/pj_gridinfo.c
+@@ -389,12 +389,12 @@ int pj_gridinfo_load( projCtx ctx, PJ_GR
+ }
+ 
+ /************************************************************************/
+-/*                        pj_gridinfo_parent()                          */
++/*                        gridinfo_parent()                          */
+ /*                                                                      */
+ /*      Seek a parent grid file by name from a grid list                */
+ /************************************************************************/
+ 
+-static PJ_GRIDINFO* pj_gridinfo_parent( PJ_GRIDINFO *gilist,
++static PJ_GRIDINFO* gridinfo_parent( PJ_GRIDINFO *gilist,
+         const char *name, int length )
+ {
+     while( gilist )
+@@ -402,7 +402,7 @@ static PJ_GRIDINFO* pj_gridinfo_parent(
+         if( strncmp(gilist->ct->id,name,length) == 0 ) return gilist;
+         if( gilist->child )
+         {
+-            PJ_GRIDINFO *parent=pj_gridinfo_parent( gilist->child, name, length );
++            PJ_GRIDINFO *parent=gridinfo_parent( gilist->child, name, length );
+             if( parent ) return parent;
+         }
+         gilist=gilist->next;
+@@ -596,7 +596,7 @@ static int pj_gridinfo_init_ntv2( projCt
+         else
+         {
+             PJ_GRIDINFO *lnk;
+-            PJ_GRIDINFO *gp = pj_gridinfo_parent(gilist,
++            PJ_GRIDINFO *gp = gridinfo_parent(gilist,
+                                                  (const char*)header+24,8);
+ 
+             if( gp == NULL )
+--- a/src/pj_init.c
++++ b/src/pj_init.c
+@@ -470,7 +470,7 @@ pj_init(int argc, char **argv) {
+ }
+ 
+ 
+-static PJ_CONSTRUCTOR pj_locate_constructor (const char *name) {
++static PJ_CONSTRUCTOR locate_constructor (const char *name) {
+     int i;
+     char *s;
+     for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ;
+@@ -557,7 +557,7 @@ pj_init_ctx(projCtx ctx, int argc, char
+         return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED);
+     name += 5;
+ 
+-    proj = pj_locate_constructor (name);
++    proj = locate_constructor (name);
+     if (0==proj)
+         return pj_dealloc_params (ctx, start, PJD_ERR_UNKNOWN_PROJECTION_ID);
+ 
+--- a/src/pj_inv.c
++++ b/src/pj_inv.c
+@@ -35,7 +35,7 @@
+ #define INPUT_UNITS  P->right
+ #define OUTPUT_UNITS P->left
+ 
+-static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) {
++static PJ_COORD inv_prepare (PJ *P, PJ_COORD coo) {
+     if (coo.xyz.x == HUGE_VAL) {
+         proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y);
+         return proj_coord_error ();
+@@ -132,7 +132,7 @@ static PJ_COORD pj_inv_prepare (PJ *P, P
+ 
+ 
+ 
+-static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) {
++static PJ_COORD inv_finalize (PJ *P, PJ_COORD coo) {
+     if (coo.xyz.x == HUGE_VAL) {
+         proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y);
+         return proj_coord_error ();
+@@ -178,7 +178,7 @@ LP pj_inv(XY xy, PJ *P) {
+     coo.xy = xy;
+ 
+     if (!P->skip_inv_prepare)
+-        coo = pj_inv_prepare (P, coo);
++        coo = inv_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+         return proj_coord_error ().lp;
+ 
+@@ -197,7 +197,7 @@ LP pj_inv(XY xy, PJ *P) {
+         return proj_coord_error ().lp;
+ 
+     if (!P->skip_inv_finalize)
+-        coo = pj_inv_finalize (P, coo);
++        coo = inv_finalize (P, coo);
+     return coo.lp;
+ }
+ 
+@@ -208,7 +208,7 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
+     coo.xyz = xyz;
+ 
+     if (!P->skip_inv_prepare)
+-        coo = pj_inv_prepare (P, coo);
++        coo = inv_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+         return proj_coord_error ().lpz;
+ 
+@@ -227,7 +227,7 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
+         return proj_coord_error ().lpz;
+ 
+     if (!P->skip_inv_finalize)
+-        coo = pj_inv_finalize (P, coo);
++        coo = inv_finalize (P, coo);
+     return coo.lpz;
+ }
+ 
+@@ -235,7 +235,7 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
+ 
+ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) {
+     if (!P->skip_inv_prepare)
+-        coo = pj_inv_prepare (P, coo);
++        coo = inv_prepare (P, coo);
+     if (HUGE_VAL==coo.v[0])
+         return proj_coord_error ();
+ 
+@@ -254,6 +254,6 @@ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P)
+         return proj_coord_error ();
+ 
+     if (!P->skip_inv_finalize)
+-        coo = pj_inv_finalize (P, coo);
++        coo = inv_finalize (P, coo);
+     return coo;
+ }
+--- a/src/pj_mutex.c
++++ b/src/pj_mutex.c
+@@ -100,9 +100,9 @@ void pj_cleanup_lock()
+ 
+ #include "pthread.h"
+ 
+-static pthread_mutex_t pj_precreated_lock = PTHREAD_MUTEX_INITIALIZER;
+-static pthread_mutex_t pj_core_lock;
+-static int pj_core_lock_created = 0;
++static pthread_mutex_t precreated_lock = PTHREAD_MUTEX_INITIALIZER;
++static pthread_mutex_t core_lock;
++static int core_lock_created = 0;
+ 
+ /************************************************************************/
+ /*                          pj_acquire_lock()                           */
+@@ -112,16 +112,16 @@ static int pj_core_lock_created = 0;
+ 
+ void pj_acquire_lock()
+ {
+-    if (!pj_core_lock_created) {
++    if (!core_lock_created) {
+         /*
+         ** We need to ensure the core mutex is created in recursive mode
+         ** and there is no portable way of doing that using automatic
+-        ** initialization so we have pj_precreated_lock only for the purpose
++        ** initialization so we have precreated_lock only for the purpose
+         ** of protecting the creation of the core lock.
+         */
+         pthread_mutexattr_t mutex_attr;
+ 
+-        pthread_mutex_lock( &pj_precreated_lock);
++        pthread_mutex_lock( &precreated_lock);
+ 
+         pthread_mutexattr_init(&mutex_attr);
+ #ifdef HAVE_PTHREAD_MUTEX_RECURSIVE
+@@ -129,13 +129,13 @@ void pj_acquire_lock()
+ #else
+         pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ #endif
+-        pthread_mutex_init(&pj_core_lock, &mutex_attr);
+-        pj_core_lock_created = 1;
++        pthread_mutex_init(&core_lock, &mutex_attr);
++        core_lock_created = 1;
+ 
+-        pthread_mutex_unlock( &pj_precreated_lock );
++        pthread_mutex_unlock( &precreated_lock );
+     }
+ 
+-    pthread_mutex_lock( &pj_core_lock);
++    pthread_mutex_lock( &core_lock);
+ }
+ 
+ /************************************************************************/
+@@ -146,7 +146,7 @@ void pj_acquire_lock()
+ 
+ void pj_release_lock()
+ {
+-    pthread_mutex_unlock( &pj_core_lock );
++    pthread_mutex_unlock( &core_lock );
+ }
+ 
+ /************************************************************************/
+--- a/src/pj_strtod.c
++++ b/src/pj_strtod.c
+@@ -69,10 +69,10 @@ double pj_atof( const char* nptr )
+ 
+ 
+ /************************************************************************/
+-/*                     pj_replace_point_by_locale_point()               */
++/*                     replace_point_by_locale_point()               */
+ /************************************************************************/
+ 
+-static char* pj_replace_point_by_locale_point(const char* pszNumber, char point,
++static char* replace_point_by_locale_point(const char* pszNumber, char point,
+                                               char* pszWorkBuffer)
+ {
+ #if !defined(HAVE_LOCALECONV)
+@@ -179,7 +179,7 @@ double pj_strtod( const char *nptr, char
+     int         nError;
+     char        szWorkBuffer[PJ_STRTOD_WORK_BUFFER_SIZE];
+ 
+-    char*       pszNumber = pj_replace_point_by_locale_point(nptr, '.', szWorkBuffer);
++    char*       pszNumber = replace_point_by_locale_point(nptr, '.', szWorkBuffer);
+ 
+     dfValue = strtod( pszNumber, endptr );
+     nError = errno;
+--- a/src/pj_transform.c
++++ b/src/pj_transform.c
+@@ -44,7 +44,7 @@ typedef enum PJ_DIRECTION PJ_DIRECTION;
+ 
+ 
+ 
+-static int pj_adjust_axis( projCtx ctx, const char *axis, int denormalize_flag,
++static int adjust_axis( projCtx ctx, const char *axis, int denormalize_flag,
+                            long point_count, int point_offset,
+                            double *x, double *y, double *z );
+ 
+@@ -104,7 +104,7 @@ static int adjust_axes (PJ *P, PJ_DIRECT
+     if (0==strcmp(P->axis,"enu"))
+         return 0;
+ 
+-    return pj_adjust_axis( P->ctx, P->axis,
++    return adjust_axis( P->ctx, P->axis,
+                 dir==PJ_FWD ? 1: 0, n, dist, x, y, z );
+ }
+ 
+@@ -914,12 +914,12 @@ int pj_datum_transform( PJ *srcdefn, PJ
+ }
+ 
+ /************************************************************************/
+-/*                           pj_adjust_axis()                           */
++/*                           adjust_axis()                           */
+ /*                                                                      */
+ /*      Normalize or de-normalized the x/y/z axes.  The normal form     */
+ /*      is "enu" (easting, northing, up).                               */
+ /************************************************************************/
+-static int pj_adjust_axis( projCtx ctx,
++static int adjust_axis( projCtx ctx,
+                            const char *axis, int denormalize_flag,
+                            long point_count, int point_offset,
+                            double *x, double *y, double *z )
+--- a/src/proj_4D_api.c
++++ b/src/proj_4D_api.c
+@@ -409,7 +409,7 @@ in cs2cs compatibility mode.
+ }
+ 
+ /*************************************************************************************/
+-static int pj_cs2cs_emulation_setup (PJ *P) {
++static int cs2cs_emulation_setup (PJ *P) {
+ /**************************************************************************************
+ If any cs2cs style modifiers are given (axis=..., towgs84=..., ) create the 4D API
+ equivalent operations, so the preparation and finalization steps in the pj_inv/pj_fwd
+@@ -564,7 +564,7 @@ PJ *proj_create (PJ_CONTEXT *ctx, const
+     pj_dealloc (args);
+ 
+     /* Support cs2cs-style modifiers */
+-    ret = pj_cs2cs_emulation_setup  (P);
++    ret = cs2cs_emulation_setup  (P);
+     if (0==ret)
+         return proj_destroy (P);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 33c6100..6b60ad9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,6 @@
 0001-Revert-fix-to-22.patch
 pr845_Refactor-pj_transform-reintroduce-support-for-vertical-scaling.patch
 pj_transform-height_unit.patch
+Remove-angle-brackets-for-proj-headers.patch
+Remove-pj_-prefix-from-static-functions.patch
+Make-sure-that-transient-errors-are-returned-correctly.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/proj.git



More information about the Pkg-grass-devel mailing list