[OSM-dev] patch: osm2pgsql on Mac OS X

David Siegel david at artcom.de
Mon Aug 27 12:21:33 BST 2007


hi,
the attached patch fixes the build of osm2pgsql on darwin. The  
O_LARGEFILE flag doesn't exist on mac os. So I added a '-DDARWIN'  
flag to the compiler command line and the necessary #ifdef stuff to  
input.c. I also added an explicit link rule. Because the compilation  
unit contains both C and C++ code it is necessary to link it using g+ 
+, not gcc. On linux this doesn't make a difference but on mac os it  
is necessary to link with the c++ stdlib.
To make the build work with headers in non standard locations, like '/ 
usr/local/pgsql/include' it was necessary to add the CFLAGS to the  
CXXFLAGS and the rule for dependency file generation.

Could someone (probably the maintainer) please test the patch on  
linux and commit it to the repository?

Apply the patch in
applications/utils/export/osm2pgsql
using
patch -p0 -i osm2pgsql-r4316.patch

The patch was taken against repository revision 4316.

Cheers,
    david

-------------- next part --------------
A non-text attachment was scrubbed...
Name: osm2pgsql-r4316.patch
Type: application/octet-stream
Size: 1546 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070827/c100c286/attachment.obj>


More information about the dev mailing list