zerebubuth / openstreetmap-cgimap

A C++ implementation of the OpenStreetMap API map call.
http://wiki.openstreetmap.org/wiki/Cgimap
GNU General Public License v2.0
72 stars 38 forks source link

MacOS issues reported in #455 #456

Closed mmd-osm closed 3 weeks ago

mmd-osm commented 3 weeks ago

Fixes #455

deevroman commented 3 weeks ago

I cloned the repository from this branch: everything compiled without errors!

mmd-osm commented 3 weeks ago

Ok, great. I think what’s left now is to add unit tests for macOS…

deevroman commented 3 weeks ago

I don't know if you've already figured out what the problem is with the test "Tag: Value with max 255 unicode characters, <= 255"

The behavior of mbsrtowcs is somehow different for Linux and macOS for the same 64-character string 😎

Linux (Docker) vs macOS (note the len value when s.size() is equal)

mmd-osm commented 3 weeks ago

No idea really why mbsrtowcs isn't working as expected. I've added another one-liner implementation for macOS now. Some deprecation warnings have been silenced, which is ok for now.

pg_virtualenv tests on a real database instance are currently disabled, since that tool seems to be unavailable on macOS. Maybe this could be addressed in another PR.

mmd-osm commented 3 weeks ago

By the way, thanks for the GH action file. I've cherry picked your commit, so that you're officially listed as contributor for this repo now.