aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-02-02 04:23:02 +0800
committerjbeich <jbeich@FreeBSD.org>2017-02-02 04:23:02 +0800
commit650a6dea280a1102bd33567fd9c38a0e15a9c6df (patch)
tree53d428bcaa11ec9407df8173796cabcbd96a29d7
parent24e3ab7de3152d5b9b0c0729e01d8074a90761fa (diff)
downloadfreebsd-ports-gnome-650a6dea280a1102bd33567fd9c38a0e15a9c6df.tar.gz
freebsd-ports-gnome-650a6dea280a1102bd33567fd9c38a0e15a9c6df.tar.zst
freebsd-ports-gnome-650a6dea280a1102bd33567fd9c38a0e15a9c6df.zip
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
-rw-r--r--devel/gcvs/files/patch-common-UCvsFiles.cpp18
-rw-r--r--devel/gcvs/files/patch-common_AppGlue.cpp11
-rw-r--r--devel/gcvs/files/patch-common_CvsArgs.cpp20
-rw-r--r--devel/gcvs/files/patch-common_TextBinary.cpp11
-rw-r--r--devel/gcvs/files/patch-rf_umenu.cpp20
5 files changed, 80 insertions, 0 deletions
diff --git a/devel/gcvs/files/patch-common-UCvsFiles.cpp b/devel/gcvs/files/patch-common-UCvsFiles.cpp
index 2a80abfe30fe..97f79e212f8f 100644
--- a/devel/gcvs/files/patch-common-UCvsFiles.cpp
+++ b/devel/gcvs/files/patch-common-UCvsFiles.cpp
@@ -27,3 +27,21 @@
}
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;
diff --git a/devel/gcvs/files/patch-common_AppGlue.cpp b/devel/gcvs/files/patch-common_AppGlue.cpp
new file mode 100644
index 000000000000..edc2283e4529
--- /dev/null
+++ b/devel/gcvs/files/patch-common_AppGlue.cpp
@@ -0,0 +1,11 @@
+--- 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
diff --git a/devel/gcvs/files/patch-common_CvsArgs.cpp b/devel/gcvs/files/patch-common_CvsArgs.cpp
new file mode 100644
index 000000000000..e2d68e36af1a
--- /dev/null
+++ b/devel/gcvs/files/patch-common_CvsArgs.cpp
@@ -0,0 +1,20 @@
+--- common/CvsArgs.cpp.orig 2002-06-27 19:02:08 UTC
++++ common/CvsArgs.cpp
+@@ -198,7 +198,7 @@ void CvsArgs::print(const char *indirect
+ {
+ CStr newarg;
+ newarg = argv[i];
+- bool hasLF = strchr(newarg, '\n') != 0L;
++ bool hasLF = strchr((const char*)newarg, '\n') != 0L;
+ size_t len = newarg.length();
+
+ if(len > MAX_PRINT_ARG)
+@@ -207,7 +207,7 @@ void CvsArgs::print(const char *indirect
+ if(hasLF)
+ newarg = expandLF(newarg, buf);
+
+- bool hasSpace = strchr(newarg, ' ') != 0L;
++ bool hasSpace = strchr((const char*)newarg, ' ') != 0L;
+ if(hasSpace)
+ cvs_out("\"");
+ cvs_outstr(newarg, newarg.length());
diff --git a/devel/gcvs/files/patch-common_TextBinary.cpp b/devel/gcvs/files/patch-common_TextBinary.cpp
new file mode 100644
index 000000000000..03ed3c848189
--- /dev/null
+++ b/devel/gcvs/files/patch-common_TextBinary.cpp
@@ -0,0 +1,11 @@
+--- common/TextBinary.cpp.orig 2003-01-10 14:12:38 UTC
++++ common/TextBinary.cpp
+@@ -463,7 +463,7 @@ bool SplitPath(const char *dir, CStr & u
+
+ void GetExtension(const char *file, CStr & base, CStr & ext)
+ {
+- char *tmp = strrchr(file, '.');
++ const char *tmp = strrchr(file, '.');
+
+ if(tmp == 0L)
+ {
diff --git a/devel/gcvs/files/patch-rf_umenu.cpp b/devel/gcvs/files/patch-rf_umenu.cpp
new file mode 100644
index 000000000000..0de2a493d018
--- /dev/null
+++ b/devel/gcvs/files/patch-rf_umenu.cpp
@@ -0,0 +1,20 @@
+--- rf/umenu.cpp.orig 2001-09-04 02:29:03 UTC
++++ rf/umenu.cpp
+@@ -254,7 +254,7 @@ static void GetMenuTitle(const char *nam
+ // get the accelerator
+ UStr copy(name);
+ char *tmp;
+- if((tmp = strchr(copy, '\t')) != 0L)
++ if((tmp = strchr((char *)copy, '\t')) != 0L)
+ {
+ *tmp++ = '\0';
+ if(strncmp(tmp, CTRLALT_STROKE, strlen(CTRLALT_STROKE)) == 0)
+@@ -277,7 +277,7 @@ static void GetMenuTitle(const char *nam
+
+ title = name;
+ #ifndef WIN32
+- if((tmp = strchr(title, '&')) != 0L)
++ if((tmp = strchr((char *)title, '&')) != 0L)
+ {
+ size_t l = tmp - (const char *)title;
+ memmove(&title[l], &title[l + 1], title.length() - l);