svn commit: r433187 - in head/audio/zinf: . files
Jan Beich
jbeich at FreeBSD.org
Fri Feb 3 00:46:47 UTC 2017
Author: jbeich
Date: Fri Feb 3 00:46:44 2017
New Revision: 433187
URL: https://svnweb.freebsd.org/changeset/ports/433187
Log:
audio/zinf: unbreak with libc++ 3.9
src/Http.cpp:771:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
char* cp = strstr(buffer, "Content-Length:");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/downloadmanager.cpp:401:15: error: cannot initialize a variable of type 'char *' with an rvalue
of type 'const char *'
char* extension = strrchr(url, '.');
^ ~~~~~~~~~~~~~~~~~
src/downloadmanager.cpp:561:11: error: cannot initialize a variable of type 'char *' with an rvalue
of type 'const char *'
char* cp = strstr(buffer, "Content-Length:");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/downloadmanager.cpp:575:11: error: cannot initialize a variable of type 'char *' with an rvalue
of type 'const char *'
char* cp = strstr(buffer, "Last-Modified:");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/downloadmanager.cpp:799:24: error: assigning to 'char *' from incompatible type 'const char *'
file = strchr(item->SourceURL().c_str() + 7, '/');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/player.cpp:552:21: error: assigning to 'char *' from incompatible type 'const char *'
extension = strrchr(url.c_str(), '.');
^~~~~~~~~~~~~~~~~~~~~~~~~
src/player.cpp:1109:17: error: assigning to 'char *' from incompatible type 'const char *'
temp_proto = strstr(title, "://");
^~~~~~~~~~~~~~~~~~~~
src/player.cpp:1129:15: error: assigning to 'char *' from incompatible type 'const char *'
temp_ext = strrchr(title, '.');
^~~~~~~~~~~~~~~~~~~
src/player.cpp:1964:14: error: cannot initialize a variable of type 'char *' with an rvalue of type
'const char *'
char *port = strchr(buffer.c_str(),':');
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/playlist.cpp:1964:15: error: cannot initialize a variable of type 'char *' with an rvalue of type
'const char *'
char* extension = strrchr(url, '.');
^ ~~~~~~~~~~~~~~~~~
src/playlist.cpp:2045:15: error: cannot initialize a variable of type 'char *' with an rvalue of type
'const char *'
char* extension = strrchr(url, '.');
^ ~~~~~~~~~~~~~~~~~
src/ThemeZip.cpp:150:15: error: assigning to 'char *' from incompatible type 'const char *'
pPtr = strrchr(oFile.c_str(), DIR_MARKER);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/wavoutpmo.cpp:127:10: error: cannot initialize a variable of type 'char *' with an rvalue of type
'const char *'
char *pPtr = strrchr(GetUrl().c_str(), DIR_MARKER);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ZinfTheme.cpp:1768:26: error: assigning to 'char *' from incompatible type 'const char *'
pExtension = strrchr((*i).c_str(), '.');
^~~~~~~~~~~~~~~~~~~~~~~~~~
pPtr = strrchr(m_oPath.c_str(), '/');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unix/src/cdpmo.cpp:116:10: error: cannot initialize a variable of type 'char *' with an rvalue of
type 'const char *'
char *tracknumber = strrchr(url, '/');
^ ~~~~~~~~~~~~~~~~~
unix/src/GTKPreferenceWindow.cpp:1755:20: error: cannot initialize a variable of type 'char *' with
an rvalue of type 'const char *'
char *name = strrchr((*i).second.c_str(), '/');
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unix/src/gtkmusicbrowser.cpp:1206:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
char *ext = strrchr(m_currentListName.c_str(), '.');
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
misc.cpp:109:14: error: assigning to 'char *' from incompatible type 'const char *'
cp = strrchr(url, '.');
^~~~~~~~~~~~~~~~~
id3lib.cpp:366:11: error: cannot initialize a variable of type 'char *' with an rvalue of type
'const char *'
char *ptr = strrchr(url, '.');
^ ~~~~~~~~~~~~~~~~~
id3lib.cpp:426:11: error: assigning to 'char *' from incompatible type 'const char *'
ptr = strrchr(url, '.');
^~~~~~~~~~~~~~~~~
id3lib.cpp:488:11: error: cannot initialize a variable of type 'char *' with an rvalue of type
'const char *'
char *ptr = strrchr(url.c_str(), '.');
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
vorbis.cpp:151:11: error: assigning to 'char *' from incompatible type 'const char *'
ptr = strrchr(url, '.');
^~~~~~~~~~~~~~~~~
Reported by: pkg-fallout
Added:
head/audio/zinf/files/patch-base_src_downloadmanager.cpp (contents, props changed)
head/audio/zinf/files/patch-base_src_player.cpp (contents, props changed)
head/audio/zinf/files/patch-base_src_playlist.cpp (contents, props changed)
head/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp (contents, props changed)
head/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp (contents, props changed)
head/audio/zinf/files/patch-plm_metadata_misc_misc.cpp (contents, props changed)
head/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp (contents, props changed)
head/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp (contents, props changed)
head/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp (contents, props changed)
head/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp (contents, props changed)
Modified:
head/audio/zinf/Makefile (contents, props changed)
head/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp (contents, props changed)
head/audio/zinf/files/patch-lib_http_src_Http.cpp (contents, props changed)
head/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp (contents, props changed)
head/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp (contents, props changed)
Modified: head/audio/zinf/Makefile
==============================================================================
--- head/audio/zinf/Makefile Fri Feb 3 00:42:47 2017 (r433186)
+++ head/audio/zinf/Makefile Fri Feb 3 00:46:44 2017 (r433187)
@@ -3,7 +3,7 @@
PORTNAME= zinf
PORTVERSION= 2.2.5
-PORTREVISION= 20
+PORTREVISION= 21
CATEGORIES= audio ipv6
MASTER_SITES= SF
Added: head/audio/zinf/files/patch-base_src_downloadmanager.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-base_src_downloadmanager.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,38 @@
+--- base/src/downloadmanager.cpp.orig 2003-09-16 17:34:53 UTC
++++ base/src/downloadmanager.cpp
+@@ -398,7 +398,7 @@ Error DownloadManager::ReadDownloadFile(
+ {
+ // find a suitable plugin
+ result = kError_FormatNotSupported;
+- char* extension = strrchr(url, '.');
++ const char* extension = strrchr(url, '.');
+
+ if(extension)
+ {
+@@ -558,7 +558,7 @@ static int32_t GetContentLengthFromHeade
+ {
+ int32_t result = -1;
+
+- char* cp = strstr(buffer, "Content-Length:");
++ const char* cp = strstr(buffer, "Content-Length:");
+
+ if(cp)
+ {
+@@ -572,7 +572,7 @@ static int32_t GetContentLengthFromHeade
+
+ static void GetContentTimeFromHeader(const char* buffer, string &mTime)
+ {
+- char* cp = strstr(buffer, "Last-Modified:");
++ const char* cp = strstr(buffer, "Last-Modified:");
+ if(cp)
+ {
+ string::size_type pos;
+@@ -748,7 +748,7 @@ Error DownloadManager::Download(Download
+ struct sockaddr_in addr;
+ struct hostent host;
+ SOCKET s = -1;
+- char* file = NULL;
++ const char* file = NULL;
+ bool useProxy;
+ struct stat st;
+ string destPath;
Added: head/audio/zinf/files/patch-base_src_player.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-base_src_player.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,51 @@
+--- base/src/player.cpp.orig 2004-02-02 17:39:35 UTC
++++ base/src/player.cpp
+@@ -547,7 +547,7 @@ void Player::HandleSingleArg(char *arg)
+ // who needs to get this, plm or dlm?
+ bool giveToDLM = false;
+ bool giveToTheme = false;
+- char* extension = NULL;
++ const char* extension = NULL;
+
+ extension = strrchr(url.c_str(), '.');
+
+@@ -1103,7 +1103,7 @@ char *
+ Player::
+ GetProtocol(const char *title)
+ {
+- char *temp_proto;
++ const char *temp_proto;
+ char *proto_return = NULL;
+
+ temp_proto = strstr(title, "://");
+@@ -1122,7 +1122,7 @@ char *
+ Player::
+ GetExtension(const char *title)
+ {
+- char *temp_ext;
++ const char *temp_ext;
+ char *ext_return = NULL;
+ char *proto = NULL;
+
+@@ -1961,15 +1961,14 @@ HandlePrefsChanged(Event *pEvent)
+ m_context->prefs->GetPrefString(kProxyHostPref, &buffer);
+ }
+
+- char *port = strchr(buffer.c_str(),':');
+- if (port) {
+- *port = '\0';
+- port++;
+- }
+ string proxyAddr = buffer;
+ int nPort = 80;
+- if (port && *port)
+- nPort = atoi(port);
++ size_t pos = buffer.find(':');
++ if (pos != string::npos) {
++ proxyAddr = buffer.substr(0, pos++);
++ if (pos < buffer.size())
++ nPort = stoi(buffer.substr(pos));
++ }
+ }
+
+
Added: head/audio/zinf/files/patch-base_src_playlist.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-base_src_playlist.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,20 @@
+--- base/src/playlist.cpp.orig 2003-09-16 17:58:13 UTC
++++ base/src/playlist.cpp
+@@ -1961,7 +1961,7 @@ Error PlaylistManager::ReadPlaylist(cons
+ {
+ // find a suitable plugin
+ result = kError_FormatNotSupported;
+- char* extension = strrchr(url, '.');
++ const char* extension = strrchr(url, '.');
+
+ if(extension)
+ {
+@@ -2042,7 +2042,7 @@ Error PlaylistManager::WritePlaylist(con
+ {
+ // find a suitable plugin
+ result = kError_FormatNotSupported;
+- char* extension = strrchr(url, '.');
++ const char* extension = strrchr(url, '.');
+
+ if(extension)
+ {
Added: head/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,11 @@
+--- io/cd/unix/src/cdpmo.cpp.orig 2003-09-16 17:34:59 UTC
++++ io/cd/unix/src/cdpmo.cpp
+@@ -113,7 +113,7 @@ Error CDPMO::SetTo(const char *url)
+ if (IsError(Init(&blah)))
+ return kError_CDInitFailed;
+
+- char *tracknumber = strrchr(url, '/');
++ const char *tracknumber = strrchr(url, '/');
+
+ if (!tracknumber)
+ tracknumber = (char *)url;
Modified: head/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp
==============================================================================
--- head/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp Fri Feb 3 00:42:47 2017 (r433186)
+++ head/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -8,3 +8,12 @@
#include <string>
/* project headers */
+@@ -124,7 +124,7 @@ Init(OutputInfo* info)
+ // it, appending an ! to the filename, and changing the extention
+ // to wav
+ std::string path;
+- char *pPtr = strrchr(GetUrl().c_str(), DIR_MARKER);
++ const char *pPtr = strrchr(GetUrl().c_str(), DIR_MARKER);
+ if (pPtr){
+ path = pPtr+1;
+ pPtr = strrchr(path.c_str(), '.');
Modified: head/audio/zinf/files/patch-lib_http_src_Http.cpp
==============================================================================
--- head/audio/zinf/files/patch-lib_http_src_Http.cpp Fri Feb 3 00:42:47 2017 (r433186)
+++ head/audio/zinf/files/patch-lib_http_src_Http.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -16,3 +16,12 @@
#ifdef WIN32
#include <io.h>
+@@ -768,7 +768,7 @@ int32_t Http::GetContentLengthFromHeader
+ {
+ int32_t result = -1;
+
+- char* cp = strstr(buffer, "Content-Length:");
++ const char* cp = strstr(buffer, "Content-Length:");
+
+ if(cp)
+ {
Added: head/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,29 @@
+--- plm/metadata/id3lib/id3lib.cpp.orig 2004-02-14 01:51:03 UTC
++++ plm/metadata/id3lib/id3lib.cpp
+@@ -363,7 +363,7 @@ bool ID3lib::ReadMetaData(const char* ur
+ assert(url);
+ assert(metadata);
+
+- char *ptr = strrchr(url, '.');
++ const char *ptr = strrchr(url, '.');
+ if (ptr == NULL)
+ return false;
+
+@@ -421,7 +421,7 @@ bool ID3lib::WriteMetaData(const char* u
+ char dummy[20];
+ bool bWriteID3v1, bWriteID3v2;
+ luint whichTags;
+- char *ptr;
++ const char *ptr;
+
+ ptr = strrchr(url, '.');
+ if (ptr == NULL)
+@@ -485,7 +485,7 @@ void ID3lib::LookupGenre(int genreId, ch
+
+ bool ID3lib::readMetadata(const std::string&url, map_type& pairs)
+ {
+- char *ptr = strrchr(url.c_str(), '.');
++ const char *ptr = strrchr(url.c_str(), '.');
+ if (ptr == NULL)
+ return false;
+
Added: head/audio/zinf/files/patch-plm_metadata_misc_misc.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-plm_metadata_misc_misc.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,34 @@
+--- plm/metadata/misc/misc.cpp.orig 2003-09-16 17:35:19 UTC
++++ plm/metadata/misc/misc.cpp
+@@ -104,26 +104,11 @@ bool Misc::ReadMetaData(const char* url,
+ if(!strncasecmp(url, "file://", 7) && !metadata->Time())
+ {
+ RegistryItem *lmcItem = NULL;
+- char* cp;
+-
+- cp = strrchr(url, '.');
+- if(cp)
+- {
+- cp++;
+-
+- char temp[256];
+-
+- strcpy(temp, cp);
+-
+- cp = temp;
+-
+- while(*cp)
+- {
+- *cp = toupper(*cp);
+- cp++;
+- }
+-
+- string ext = temp;
++ const string temp(url);
++ size_t pos = temp.rfind('.');
++ if (pos != string::npos) {
++ string ext = temp.substr(++pos);
++ transform(ext.begin(), ext.end(), ext.begin(), ::toupper);
+
+ ExtensionMap::const_iterator iter = m_extensions.find(ext);
+ if(iter != m_extensions.end())
Modified: head/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp
==============================================================================
--- head/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp Fri Feb 3 00:42:47 2017 (r433186)
+++ head/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -8,3 +8,33 @@
#include <math.h>
#include <assert.h>
#include <string>
+@@ -143,17 +143,18 @@ Vorbis::~Vorbis()
+ bool Vorbis::WriteMetaData(const char *url, const MetaData & metadata)
+ {
+ char dummy[20];
+- char *ptr;
+ bool writetags;
+ // We will support only id3-like tags. For a more complete list see
+ // http://reactor-core.org/ogg-tag-standard.html
+
+- ptr = strrchr(url, '.');
++ {
++ const char *ptr = strrchr(url, '.');
+ if (ptr == NULL)
+ return false;
+
+ if (strcasecmp(ptr, ".ogg"))
+ return false;
++ }
+
+ m_context->prefs->GetPrefBoolean(kWriteVorbisTagsPref, &writetags);
+
+@@ -216,7 +217,7 @@ bool Vorbis::WriteMetaData(const char *u
+ strncpy(newpath,path.c_str(),path.length());
+ FILE *out = NULL;
+
+- ptr = strrchr(newpath, '.');
++ char *ptr = strrchr(newpath, '.');
+ if (ptr)
+ {
+ strcpy(ptr, "XXXXXX");
Added: head/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,11 @@
+--- ui/musicbrowser/unix/src/gtkmusicbrowser.cpp.orig 2004-02-02 18:34:19 UTC
++++ ui/musicbrowser/unix/src/gtkmusicbrowser.cpp
+@@ -1203,7 +1203,7 @@ void GTKMusicBrowser::SaveCurrentPlaylis
+ if (m_currentListName.length() == 0)
+ return;
+
+- char *ext = strrchr(m_currentListName.c_str(), '.');
++ const char *ext = strrchr(m_currentListName.c_str(), '.');
+ if (ext)
+ ext = ext + 1;
+ Error result = kError_NoErr;
Added: head/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,11 @@
+--- ui/zinf/src/Headlines.cpp.orig 2003-09-16 17:35:32 UTC
++++ ui/zinf/src/Headlines.cpp
+@@ -215,7 +215,7 @@ Error Headlines::PCData(string &oData)
+
+ Error Headlines::EndElement(string &oElement)
+ {
+- char *pPtr;
++ const char *pPtr;
+ int iOffset;
+
+ pPtr = strrchr(m_oPath.c_str(), '/');
Modified: head/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp
==============================================================================
--- head/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp Fri Feb 3 00:42:47 2017 (r433186)
+++ head/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -22,3 +22,12 @@
using namespace std;
#include "zlib.h"
+@@ -143,7 +143,7 @@ Error ThemeZip::CompressThemeZip(const s
+ pBuffer = new char[iBufferSize];
+ for(i = oFileList.begin(); i != oFileList.end(); i++)
+ {
+- char *pPtr;
++ const char *pPtr;
+ time_t ltime;
+
+ oFile = *(*i);
Added: head/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,11 @@
+--- ui/zinf/src/ZinfTheme.cpp.orig 2003-09-16 17:36:22 UTC
++++ ui/zinf/src/ZinfTheme.cpp
+@@ -1739,7 +1739,7 @@ void ZinfTheme::DropFiles(vector<string>
+ countbefore = m_pContext->plm->CountItems();
+
+ for(i = pFileList->begin(); i != pFileList->end(); i++){
+- char *pExtension = NULL;
++ const char *pExtension = NULL;
+ vector<char*> fileList;
+ struct _stat st;
+
Added: head/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp Fri Feb 3 00:46:44 2017 (r433187)
@@ -0,0 +1,11 @@
+--- ui/zinf/unix/src/GTKPreferenceWindow.cpp.orig 2003-11-20 23:58:47 UTC
++++ ui/zinf/unix/src/GTKPreferenceWindow.cpp
+@@ -1752,7 +1752,7 @@ void GTKPreferenceWindow::UpdateThemeLis
+ originalValues.listboxIndex = proposedValues.listboxIndex
+ = currentValues.listboxIndex = iLoop;
+ else {
+- char *name = strrchr((*i).second.c_str(), '/');
++ const char *name = strrchr((*i).second.c_str(), '/');
+ if (name) {
+ name++;
+ if (name && *name) {
More information about the svn-ports-head
mailing list