Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 5fa10ff6b1b60abee172296d9c1dec8dfc10615c Mon Sep 17 00:00:00 2001 |
| 2 | From: Stefan Saraev <stefan@saraev.ca> |
| 3 | Date: Sun, 7 May 2017 17:30:47 +0300 |
| 4 | Subject: [PATCH] FTPParse.cpp: use std::string |
| 5 | |
| 6 | Fixes build with newer gcc versions. |
| 7 | |
| 8 | Taken from [1] |
| 9 | |
| 10 | Upstream-Status: Backport [2] |
| 11 | |
| 12 | [1] https://git.busybox.net/buildroot/plain/package/kodi/0003-FTPParse.cpp-use-std-string.patch?id=e2f03a6bde19766a1ac047c5ccfb049b5c4f61ca |
| 13 | [2] https://github.com/xbmc/xbmc/commit/5fa10ff6b1b60abee172296d9c1dec8dfc10615c |
| 14 | |
| 15 | Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> |
| 16 | --- |
| 17 | xbmc/filesystem/FTPParse.cpp | 44 ++++++++++++++++++++++---------------------- |
| 18 | 1 file changed, 22 insertions(+), 22 deletions(-) |
| 19 | |
| 20 | diff --git a/xbmc/filesystem/FTPParse.cpp b/xbmc/filesystem/FTPParse.cpp |
| 21 | index cfcc7c64ed..b0f676ae1a 100644 |
| 22 | --- a/xbmc/filesystem/FTPParse.cpp |
| 23 | +++ b/xbmc/filesystem/FTPParse.cpp |
| 24 | @@ -34,7 +34,7 @@ CFTPParse::CFTPParse() |
| 25 | m_time = 0; |
| 26 | } |
| 27 | |
| 28 | -string CFTPParse::getName() |
| 29 | +std::string CFTPParse::getName() |
| 30 | { |
| 31 | return m_name; |
| 32 | } |
| 33 | @@ -59,16 +59,16 @@ time_t CFTPParse::getTime() |
| 34 | return m_time; |
| 35 | } |
| 36 | |
| 37 | -void CFTPParse::setTime(string str) |
| 38 | +void CFTPParse::setTime(std::string str) |
| 39 | { |
| 40 | /* Variables used to capture patterns via the regexes */ |
| 41 | - string month; |
| 42 | - string day; |
| 43 | - string year; |
| 44 | - string hour; |
| 45 | - string minute; |
| 46 | - string second; |
| 47 | - string am_or_pm; |
| 48 | + std::string month; |
| 49 | + std::string day; |
| 50 | + std::string year; |
| 51 | + std::string hour; |
| 52 | + std::string minute; |
| 53 | + std::string second; |
| 54 | + std::string am_or_pm; |
| 55 | |
| 56 | /* time struct used to set the time_t variable */ |
| 57 | struct tm time_struct = {}; |
| 58 | @@ -338,21 +338,21 @@ int CFTPParse::getDayOfWeek(int month, int date, int year) |
| 59 | return day_of_week; |
| 60 | } |
| 61 | |
| 62 | -int CFTPParse::FTPParse(string str) |
| 63 | +int CFTPParse::FTPParse(std::string str) |
| 64 | { |
| 65 | /* Various variable to capture patterns via the regexes */ |
| 66 | - string permissions; |
| 67 | - string link_count; |
| 68 | - string owner; |
| 69 | - string group; |
| 70 | - string size; |
| 71 | - string date; |
| 72 | - string name; |
| 73 | - string type; |
| 74 | - string stuff; |
| 75 | - string facts; |
| 76 | - string version; |
| 77 | - string file_id; |
| 78 | + std::string permissions; |
| 79 | + std::string link_count; |
| 80 | + std::string owner; |
| 81 | + std::string group; |
| 82 | + std::string size; |
| 83 | + std::string date; |
| 84 | + std::string name; |
| 85 | + std::string type; |
| 86 | + std::string stuff; |
| 87 | + std::string facts; |
| 88 | + std::string version; |
| 89 | + std::string file_id; |
| 90 | |
| 91 | /* Regex for standard Unix listing formats */ |
| 92 | pcrecpp::RE unix_re("^([-bcdlps])" // type |
| 93 | -- |
| 94 | 2.11.0 |
| 95 | |
| 96 | |