Opened 9 years ago

Closed 8 years ago

#3607 closed defect (fixed)

[PATCH] osm2pgsql: replace index with strchr in parse-primitive.c

Reported by: mobrob Owned by: frederik@…
Priority: major Milestone:
Component: osm2pgsql Version:
Keywords: osm2pgsql mingw Cc: Ldp


While trying to build osm2pgsql in MinGW I had the problem that the usage of function "index" in parse-primitive.c is causing problems as this function does not exist in MinGW environment.

From what I know index has been superseded by strchr which has exactly the same signature and syntax.

The attached patch does simply replace all occurrences of "index" in parse-primitive.c with "strchr" so that it can be build.

As strchr should be available also on other platforms this should not have an negative impact.

Attachments (1)

parse-primitive.patch (2.7 KB) - added by mobrob 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by mobrob

Attachment: parse-primitive.patch added

comment:1 Changed 9 years ago by Ldp

Cc: Ldp added
Owner: changed from mapnik-team@… to frederik@…
Status: newassigned

comment:2 Changed 8 years ago by skorasaurus

Component: mapnikosm2pgsql

comment:3 Changed 8 years ago by amm

Thanks for the patch. I have now committed an equivalent patch in r28865.

Are there any other issues needed to get osm2pgsql compiled in MinGW?

comment:4 Changed 8 years ago by amm

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.