ports/devel/gcvs/files/patch-common-UCvsFiles.cpp
Jan Beich 9ad196a4cb devel/gcvs: unbreak with libc++ 3.9
AppGlue.cpp:263:9: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
                char *login = strchr(ccvsroot, '@');
                      ^       ~~~~~~~~~~~~~~~~~~~~~
CvsArgs.cpp:201:16: error: call to 'strchr' is ambiguous
                bool hasLF = strchr(newarg, '\n') != 0L;
                             ^~~~~~
CvsArgs.cpp:210:19: error: call to 'strchr' is ambiguous
                bool hasSpace = strchr(newarg, ' ') != 0L;
                                ^~~~~~
TextBinary.cpp:466:8: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
        char *tmp = strrchr(file, '.');
              ^     ~~~~~~~~~~~~~~~~~~
UCvsFiles.cpp:2020:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(r1, '.')) != 0L)
                  ^~~~~~
UCvsFiles.cpp:2028:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(r2, '.')) != 0L)
                  ^~~~~~
umenu.cpp:257:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(copy, '\t')) != 0L)
                  ^~~~~~
umenu.cpp:280:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(title, '&')) != 0L)
                  ^~~~~~

Reported by:	pkg-fallout
2017-02-01 20:23:02 +00:00

47 lines
1.1 KiB
C++

--- common/UCvsFiles.cpp.orig 2002-08-13 13:46:40.000000000 +0200
+++ common/UCvsFiles.cpp 2007-11-22 21:01:27.000000000 +0100
@@ -201,7 +201,7 @@
#define NUM_COLUMNS 7
-static char *_gszColumnLabel[NUM_COLUMNS] =
+static const char *_gszColumnLabel[NUM_COLUMNS] =
{
"Name", "Rev.", "Option", "Status", "Tag", "Date", "Conflict"
};
@@ -1214,7 +1214,7 @@
{
UStr uppath, filename;
SplitPath(m_path, uppath, filename);
- ResetView(uppath, true);
+ ResetView( (const char *)uppath, true);
return 0;
}
@@ -1895,7 +1895,7 @@
fullpath << (*data)[EntnodeData::kName];
if(data->GetType() == ENT_SUBDIR)
{
- ResetView(fullpath, true);
+ ResetView( (const char *)fullpath, true);
}
else
{
@@ -2017,7 +2017,7 @@ static int revcmp(const char *rev1, cons
char *tmp;
int v1, v2;
- if((tmp = strchr(r1, '.')) != 0L)
+ if((tmp = strchr((char *)r1, '.')) != 0L)
{
tmp[0] = '\0';
q1 = tmp + 1;
@@ -2025,7 +2025,7 @@ static int revcmp(const char *rev1, cons
v1 = atoi(r1);
- if((tmp = strchr(r2, '.')) != 0L)
+ if((tmp = strchr((char *)r2, '.')) != 0L)
{
tmp[0] = '\0';
q2 = tmp + 1;