gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / orpheus-cast-errors-and-includes.patch
1 The 'intcompare' definition was causing a "cast from 'void*' to 'int' loses
2 precision [-fpermissive]" error. It isn't used anywhere, so simply remove it.
3 Same with 'findint' in texteditor.cc.
4
5 Fix other "cast from ‘void*’ to ‘int’ loses precision" errors.
6
7 --- a/kkstrtext-0.1/kkstrtext.cc 2005-01-31 18:13:24.000000000 -0600
8 +++ b/kkstrtext-0.1/kkstrtext.cc 2014-07-24 00:25:07.149305476 -0500
9 @@ -430,10 +430,6 @@
10 }
11 }
12
13 -int intcompare(void *s1, void *s2) {
14 - return (int) s1 != (int) s2;
15 -}
16 -
17 string i2str(int i) {
18 char buf[64];
19 sprintf(buf, "%d", i);
20 @@ -885,7 +881,7 @@
21 #ifdef HAVE_ICONV
22 iconv_t cd = iconv_open(tocs.c_str(), fromcs.c_str());
23
24 - if(((int) cd) != -1) {
25 + if(cd != (iconv_t) -1) {
26 string r, text(atext);
27 size_t inleft, outleft, soutleft;
28 char *inbuf, *outbuf, *sinbuf, *soutbuf;
29 --- a/kkconsui-0.1/src/texteditor.cc 2003-09-09 16:51:33.000000000 -0500
30 +++ b/kkconsui-0.1/src/texteditor.cc 2014-07-24 00:33:20.093279060 -0500
31 @@ -1939,10 +1939,6 @@
32 if(ur) delete ur;
33 }
34
35 -int texteditor::findint(void *p1, void *p2) {
36 - return *(int *) p1 != (int) p2;
37 -}
38 -
39 int texteditor::findhighline(void *p1, void *p2) {
40 return *(int *) p1 != ((highline *) p2)->line;
41 }
42 --- a/src/streamtrack.cc 2006-05-11 12:45:20.000000000 -0500
43 +++ b/src/streamtrack.cc 2014-07-24 00:38:10.797263482 -0500
44 @@ -34,6 +34,7 @@
45 #include <sys/wait.h>
46 #include <sys/stat.h>
47 #include <signal.h>
48 +#include <unistd.h>
49
50 #include <algorithm>
51