Opened 14 years ago
Closed 13 years ago
#663 closed patch (fixed)
shp2pgsql uses the wrong return type for pgis_getopt
Reported by: | ssinger | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 1.5.4 |
Component: | utils/loader-dumper | Version: | 1.5.X |
Keywords: | Cc: |
Description
pgis_getopt is defined to return an int (like a normal getopt).
However in shp2pgsql-cli and -gui the value is being stored as a char.
The compiler then promotes this char back to an int to compare with EOF. The promotion of a char to an int with respect to negative numbers differs based on hardware platform. On powerpc the ((char)-1) != -1
If we store the result of pgis_getopt as an int we avoid this issue.
Patch attached.
Attachments (1)
Change History (6)
by , 14 years ago
Attachment: | getopt_return.diff added |
---|
comment:2 by , 14 years ago
Component: | postgis → loader/dumper |
---|
comment:3 by , 13 years ago
Milestone: | PostGIS 1.5.3 → PostGIS 2.0.0 |
---|
comment:4 by , 13 years ago
Milestone: | PostGIS 2.0.0 → PostGIS 1.5.4 |
---|
Note:
See TracTickets
for help on using tickets.
patch to fix the bug