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

Martijn van Oosterhout kleptog at gmail.com
Mon Aug 27 15:13:11 BST 2007


Wouldn't it have been simpler to do:

#ifdef O_LARGEFILE
flags |= O_LARGEFILE
#endif

and do away with the DARWIN symbol?

The Makefile bit looks mostly OK. If you like i can check it into SVN for you.

Have a nice day,

On 8/27/07, David Siegel <david at artcom.de> wrote:
> 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
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
>
>


-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the dev mailing list