ports/devel/gcvs/files/patch-common_AppGlue.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

11 lines
408 B
C++

--- common/AppGlue.cpp.orig 2002-03-12 18:34:31 UTC
+++ common/AppGlue.cpp
@@ -260,7 +260,7 @@ CVS_EXTERN_C const char *glue_getenv(cha
// extract from the cvsroot
const char *ccvsroot = gCvsPrefs;
ccvsroot = Authen::skiptoken(ccvsroot);
- char *login = strchr(ccvsroot, '@');
+ const char *login = strchr(ccvsroot, '@');
if(login == NULL)
{
// for WIN32 this means the CVSROOT is local