diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-12 20:37:10 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-12 20:37:10 +0000 |
commit | a15882683a1eff1a311699b57cf3ca4a801e3694 (patch) | |
tree | 5071177eb71422b76ce25e2c41e01daa60bcc225 /games-sports/toycars/files | |
parent | Fix building with GCC 4.4+ wrt #273226, thanks to vasuvi from #gentoo-kde for... (diff) | |
download | gentoo-2-a15882683a1eff1a311699b57cf3ca4a801e3694.tar.gz gentoo-2-a15882683a1eff1a311699b57cf3ca4a801e3694.tar.bz2 gentoo-2-a15882683a1eff1a311699b57cf3ca4a801e3694.zip |
Fix building with GLIBC 2.10+ wrt #277072, thanks to Dominik Kapusta for patch.
(Portage version: 2.2_rc38/cvs/Linux x86_64)
Diffstat (limited to 'games-sports/toycars/files')
-rw-r--r-- | games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch b/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch new file mode 100644 index 000000000000..e3c184724c6d --- /dev/null +++ b/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch @@ -0,0 +1,101 @@ +diff --git a/toycars_track_editor/src/TrackView.cxx b/toycars_track_editor/src/TrackView.cxx +index d52daba..e1a66df 100644 +--- a/toycars_track_editor/src/TrackView.cxx ++++ b/toycars_track_editor/src/TrackView.cxx +@@ -89,7 +89,7 @@ TiXmlDocument *findXMLFile(const char *filename, SearchDirectories *dirs, char * + //{jpg,png,bmp,pnm,pbm,pgm,ppm} + Fl_Image* loadImage(const char *filename) + { +- char *suffix = strrchr(filename, '.'); ++ const char *suffix = strrchr(filename, '.'); + if (suffix == NULL) + return NULL; + if (strcmp(suffix,".jpg") == 0) +@@ -969,13 +969,13 @@ void TrackView::installMap(const char *name) + uninstallMap(name); + + // chop off any .xml suffix +- temp = strrchr(name, '.'); ++ temp = const_cast<char*>( strrchr(name, '.') ); + if (temp) { + if (strcmp(temp, ".xml") == 0) + temp[0] = '\0'; + } + // remove path +- temp = strrchr(name, '/'); ++ temp = const_cast<char*>( strrchr(name, '/') ); + if (temp) { + strncpy(trackname, temp+1, 255); + } +@@ -1044,13 +1044,13 @@ void TrackView::uninstallMap(const char *name) + char *temp; + + // chop off any .xml suffix +- temp = strrchr(name, '.'); ++ temp = const_cast<char*>( strrchr(name, '.') ); + if (temp) { + if (strcmp(temp, ".xml") == 0) + temp[0] = '\0'; + } + // remove path +- temp = strrchr(name, '/'); ++ temp = const_cast<char*>( strrchr(name, '/') ); + if (temp) { + strncpy(trackname, temp+1, 255); + } +diff --git a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp b/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp +index 4b6ff50..7aa6c40 100644 +--- a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp ++++ b/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp +@@ -23,7 +23,7 @@ + //{jpg,png,bmp,pnm,pbm,pgm,ppm} + Fl_Image* loadImage(const char *filename) + { +- char *suffix = strrchr(filename, '.'); ++ const char *suffix = strrchr(filename, '.'); + if (suffix == NULL) + return NULL; + if (strcmp(suffix,".jpg") == 0) +diff --git a/toycars_vehicle_editor/src/VehicleObject.cpp b/toycars_vehicle_editor/src/VehicleObject.cpp +index 3f61114..0bd2978 100644 +--- a/toycars_vehicle_editor/src/VehicleObject.cpp ++++ b/toycars_vehicle_editor/src/VehicleObject.cpp +@@ -533,13 +533,13 @@ void VehicleObject::installVehicle(const char *name) + uninstallVehicle(name); + + // chop off any .xml suffix +- temp = strrchr(name, '.'); ++ temp = const_cast<char*>( strrchr(name, '.') ); + if (temp) { + if (strcmp(temp, ".xml") == 0) + temp[0] = '\0'; + } + // remove path +- temp = strrchr(name, '/'); ++ temp = const_cast<char*>( strrchr(name, '/') ); + if (temp) { + strncpy(carname, temp+1, 255); + } +@@ -610,13 +610,13 @@ void VehicleObject::uninstallVehicle(const char *name) + char *temp; + + // chop off any .xml suffix +- temp = strrchr(name, '.'); ++ temp = const_cast<char*>( strrchr(name, '.') ); + if (temp) { + if (strcmp(temp, ".xml") == 0) + temp[0] = '\0'; + } + // remove path +- temp = strrchr(name, '/'); ++ temp = const_cast<char*>( strrchr(name, '/') ); + if (temp) { + strncpy(carname, temp+1, 255); + } +@@ -675,4 +675,4 @@ void VehicleObject::uninstallVehicle(const char *name) + system(str); + */ + #endif +-} +\ No newline at end of file ++} |