RSS

Posts Tagged ‘consola’

pftp-mew es un cliente en ncurses para consola, para ftp y fxp, la mar de útil y configurable. pftp-shit es una modificación con mas opciones y algo mas optimizada. Son los mejores clientes para consola pero ya van siendo un poco antiguos y a la vez que muy estables eso si, pero hay versiones nuevas de gcc, como en mi caso la 4.4.3 que escupen fallos a la hora de compilarlo.

tcp.cc:362: warning: deprecated conversion from string constant to ‘char*’
tcp.cc: In member function ‘void CTCP::AddLogLine(char*)’:  
tcp.cc:420: warning: deprecated conversion from string constant to ‘char*’
tcp.cc: In member function ‘void CTCP::UpdateStack()’:
tcp.cc:499: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:544: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:548: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:552: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:556: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:574: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:577: warning: deprecated conversion from string constant to ‘char*’
tcp.cc: In member function ‘int CTCP::WaitForDataAndRead(int, int*)’:
tcp.cc:646: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:670: warning: deprecated conversion from string constant to ‘char*’
tcp.cc: In member function ‘bool CTCP::WaitForMessage(int)’:
tcp.cc:704: warning: deprecated conversion from string constant to ‘char*’
tcp.cc:710: warning: deprecated conversion from string constant to ‘char*’
In file included from /usr/include/fcntl.h:205,
                 from tcp.cc:7:
In function ‘int open(const char*, int, ...)’,
    inlined from ‘bool CTCP::ReadFile(char*, long int)’ at tcp.cc:1178:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
tcp.cc: In function ‘bool DetermineOwnIP(char*)’:
tcp.cc:61: warning: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
tcp.cc:61: note: initialized from here
make[1]: *** [tcp.o] Error 1

En este caso lo que debemos hacer para poder compilar en cualquier versión de GCC es lo siguiente:

Nos vamos al fichero src/tcp.cc

buscamos esta linea

open(name, O_CREAT | O_TRUNC, | O_RDWR | O_BINARY)) == -1) {

y sustituimos por esta

open(name, O_CREAT | O_TRUNC,0664 | O_RDWR | O_BINARY)) == -1) {

Ya podemos hacer un make dynamic, y aunque seguiran pegando warnings, el ejecutable se compilará y funcionará